diff options
| author | Ingo Molnar <[email protected]> | 2014-01-05 11:34:29 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2014-01-05 11:34:29 +0000 |
| commit | ef0b8b9a521c65201bfca9747ee1bf374296133c (patch) | |
| tree | 644c3390c07d06fb7807182a4935f7c3f675b157 /arch/x86/include/asm/preempt.h | |
| parent | x86/efi: parse_efi_setup() build fix (diff) | |
| parent | Linux 3.13-rc7 (diff) | |
| download | kernel-ef0b8b9a521c65201bfca9747ee1bf374296133c.tar.gz kernel-ef0b8b9a521c65201bfca9747ee1bf374296133c.zip | |
Merge tag 'v3.13-rc7' into x86/efi-kexec to resolve conflicts
Conflicts:
arch/x86/platform/efi/efi.c
drivers/firmware/efi/Kconfig
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'arch/x86/include/asm/preempt.h')
| -rw-r--r-- | arch/x86/include/asm/preempt.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h index 8729723636fd..c8b051933b1b 100644 --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h @@ -8,6 +8,12 @@ DECLARE_PER_CPU(int, __preempt_count); /* + * We use the PREEMPT_NEED_RESCHED bit as an inverted NEED_RESCHED such + * that a decrement hitting 0 means we can and should reschedule. + */ +#define PREEMPT_ENABLED (0 + PREEMPT_NEED_RESCHED) + +/* * We mask the PREEMPT_NEED_RESCHED bit so as not to confuse all current users * that think a non-zero value indicates we cannot preempt. */ @@ -74,6 +80,11 @@ static __always_inline void __preempt_count_sub(int val) __this_cpu_add_4(__preempt_count, -val); } +/* + * Because we keep PREEMPT_NEED_RESCHED set when we do _not_ need to reschedule + * a decrement which hits zero means we have no preempt_count and should + * reschedule. + */ static __always_inline bool __preempt_count_dec_and_test(void) { GEN_UNARY_RMWcc("decl", __preempt_count, __percpu_arg(0), "e"); |
