lkml.org 
[lkml]   [2015]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 6/6] preempt: Remove PREEMPT_ACTIVE unmasking off in_atomic()
    Date
    Now that PREEMPT_ACTIVE implies PREEMPT_DISABLE_OFFSET, ignoring
    PREEMPT_ACTIVE from in_atomic() check isn't useful anymore.

    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
    ---
    include/linux/preempt.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/include/linux/preempt.h b/include/linux/preempt.h
    index 4057696..a1a00e1 100644
    --- a/include/linux/preempt.h
    +++ b/include/linux/preempt.h
    @@ -112,7 +112,7 @@
    * used in the general case to determine whether sleeping is possible.
    * Do not use in_atomic() in driver code.
    */
    -#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0)
    +#define in_atomic() (preempt_count() != 0)

    /*
    * Check whether we were atomic before we did preempt_disable():
    --
    2.1.4


    \
     
     \ /
      Last update: 2015-05-12 17:21    [W:2.612 / U:0.280 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site