diff options
Diffstat (limited to 'include/linux/hardirq.h')
| -rw-r--r-- | include/linux/hardirq.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 32f9fd6619b4..ba362171e8ae 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -93,13 +93,6 @@ | |||
| 93 | */ | 93 | */ |
| 94 | #define in_nmi() (preempt_count() & NMI_MASK) | 94 | #define in_nmi() (preempt_count() & NMI_MASK) |
| 95 | 95 | ||
| 96 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL) | ||
| 97 | # include <linux/sched.h> | ||
| 98 | # define PREEMPT_INATOMIC_BASE (current->lock_depth >= 0) | ||
| 99 | #else | ||
| 100 | # define PREEMPT_INATOMIC_BASE 0 | ||
| 101 | #endif | ||
| 102 | |||
| 103 | #if defined(CONFIG_PREEMPT) | 96 | #if defined(CONFIG_PREEMPT) |
| 104 | # define PREEMPT_CHECK_OFFSET 1 | 97 | # define PREEMPT_CHECK_OFFSET 1 |
| 105 | #else | 98 | #else |
| @@ -113,7 +106,7 @@ | |||
| 113 | * used in the general case to determine whether sleeping is possible. | 106 | * used in the general case to determine whether sleeping is possible. |
| 114 | * Do not use in_atomic() in driver code. | 107 | * Do not use in_atomic() in driver code. |
| 115 | */ | 108 | */ |
| 116 | #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_INATOMIC_BASE) | 109 | #define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0) |
| 117 | 110 | ||
| 118 | /* | 111 | /* |
| 119 | * Check whether we were atomic before we did preempt_disable(): | 112 | * Check whether we were atomic before we did preempt_disable(): |
