linux/arch
Konstantin Khlebnikov fe32d3cd5e sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()
These functions check should_resched() before unlocking spinlock/bh-enable:
preempt_count always non-zero => should_resched() always returns false.
cond_resched_lock() worked iff spin_needbreak is set.

This patch adds argument "preempt_offset" to should_resched().

preempt_count offset constants for that:

  PREEMPT_DISABLE_OFFSET  - offset after preempt_disable()
  PREEMPT_LOCK_OFFSET     - offset after spin_lock()
  SOFTIRQ_DISABLE_OFFSET  - offset after local_bh_distable()
  SOFTIRQ_LOCK_OFFSET     - offset after spin_lock_bh()

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Graf <agraf@suse.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: bdb4380658 ("sched: Extract the basic add/sub preempt_count modifiers")
Link: http://lkml.kernel.org/r/20150715095204.12246.98268.stgit@buzz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-08-03 12:21:24 +02:00
..
alpha TTY/Serial driver patches for 4.2-rc1 2015-06-26 15:53:22 -07:00
arc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
arm - hwspinlock core DT support from Suman Anna 2015-07-03 14:52:25 -07:00
arm64 Various arm64 fixes: 2015-07-03 12:28:30 -07:00
avr32 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-07-01 15:19:35 -07:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
c6x Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
cris Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
frv Fix up implicit <module.h> users that will break later. 2015-07-02 10:25:22 -07:00
h8300 h8300: Always build dtb 2015-06-23 13:36:00 +09:00
hexagon Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
ia64 remove some boot noise from a now-invalid check that pages are reserved 2015-07-02 14:46:15 -07:00
m32r Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
m68k Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-07-01 15:19:35 -07:00
metag Merge branch 'akpm' (patches from Andrew) 2015-06-26 09:52:05 -07:00
microblaze Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
mips Devicetree changes for v4.2 2015-07-01 19:40:18 -07:00
mn10300 Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
nios2 nios2 update for v4.2 2015-07-03 12:22:49 -07:00
openrisc Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
parisc Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
powerpc sched/preempt, powerpc, kvm: Use need_resched() instead of should_resched() 2015-08-03 12:21:24 +02:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
score Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
sh Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
sparc Merge branch 'akpm' (patches from Andrew) 2015-06-26 09:52:05 -07:00
tile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-07-04 19:36:06 -07:00
um Minor merge needed, due to function move. 2015-07-01 10:49:25 -07:00
unicore32 arch/unicore32/kernel/fpu-ucf64.c: remove unnecessary KERN_ERR 2015-06-30 19:44:59 -07:00
x86 sched/preempt: Fix cond_resched_lock() and cond_resched_softirq() 2015-08-03 12:21:24 +02:00
xtensa Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
.gitignore
Kconfig clone: support passing tls argument via C rather than pt_regs magic 2015-06-25 17:00:38 -07:00