This makes sure we always observe the one true TIF_NEED_RESCHED bit
and things will work as expected again.
+Cc: bp@alien8.de
Cc: fweisbec@gmail.com
+Cc: david.a.cohen@linux.intel.com
Cc: mingo@kernel.org
+Cc: fweisbec@gmail.com
+Cc: greg@kroah.com
Cc: Steven Rostedt <rostedt@goodmis.org>
+Cc: gregkh@linuxfoundation.org
+Cc: pbonzini@redhat.com
+Cc: rostedt@goodmis.org
+Cc: stefan.bader@canonical.com
+Cc: mingo@kernel.org
+Cc: toralf.foerster@gmx.de
Cc: David Cohen <david.a.cohen@linux.intel.com>
+Cc: Steven Rostedt <rostedt@goodmis.org>
+Cc: torvalds@linux-foundation.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
+Cc: David Cohen <david.a.cohen@linux.intel.com>
+Cc: <stable@vger.kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
+Cc: Paolo Bonzini <pbonzini@redhat.com>
+Cc: <stable-commits@vger.kernel.org>
+Cc: Borislav Petkov <bp@alien8.de>
+Cc: peterz@infradead.org
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: barra_cuda@katamail.com
Tested-by: Stefan Bader <stefan.bader@canonical.com>
-Tested-by: Toralf Förster <toralf.foerster@gmx.de>
+Tested-by: Toralf F¿rster <toralf.foerster@gmx.de>
Tested-by: Michele Ballabio <barra_cuda@katamail.com>
-Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Peter Zijlstra <peterz@infradead.org>
+Link: http://lkml.kernel.org/r/20140409142447.GD13658@twins.programming.kicks-ass.net
+
---
- arch/x86/include/asm/preempt.h | 11 +++++++++++
- include/linux/preempt.h | 4 ++++
+ arch/x86/include/asm/preempt.h | 12 ++++++++++++
+ include/linux/preempt.h | 2 ++
include/linux/thread_info.h | 2 --
- 3 files changed, 15 insertions(+), 2 deletions(-)
+ 3 files changed, 14 insertions(+), 2 deletions(-)
--- a/arch/x86/include/asm/preempt.h
+++ b/arch/x86/include/asm/preempt.h
-@@ -5,6 +5,17 @@
+@@ -5,6 +5,18 @@
#include <asm/percpu.h>
#include <linux/thread_info.h>
+ * We hard rely on the fact that all the TIF_NEED_RESCHED bits are
+ * the same, therefore use the slightly more expensive version below.
+ */
++#undef tif_need_resched
+#define tif_need_resched() test_tsk_thread_flag(current, TIF_NEED_RESCHED)
+#endif
+
/*
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
-@@ -17,6 +17,10 @@
-
- #include <asm/preempt.h>
+@@ -15,6 +15,8 @@
+ */
+ #define PREEMPT_NEED_RESCHED 0x80000000
-+#ifndef tif_need_resched
+#define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
-+#endif
+
+ #include <asm/preempt.h>
+
#if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER)
- extern void preempt_count_add(int val);
- extern void preempt_count_sub(int val);
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -118,8 +118,6 @@ static inline __deprecated void set_need