From 506081dd046988e4af39c0b9013a211313803819 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 14 May 2014 18:01:23 +0200 Subject: [PATCH] modified version of queue-3.14/x86-preempt-fix-preemption-for-i386.patch --- .../x86-preempt-fix-preemption-for-i386.patch | 47 ++++++++++++++----- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/queue-3.14/x86-preempt-fix-preemption-for-i386.patch b/queue-3.14/x86-preempt-fix-preemption-for-i386.patch index aff4206f59f..31fc5b22691 100644 --- a/queue-3.14/x86-preempt-fix-preemption-for-i386.patch +++ b/queue-3.14/x86-preempt-fix-preemption-for-i386.patch @@ -38,26 +38,48 @@ for tif_need_resched() instead of the ESP based current_thread_info(). 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 +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 +Cc: Steven Rostedt +Cc: torvalds@linux-foundation.org Cc: Paolo Bonzini +Cc: David Cohen +Cc: Cc: Borislav Petkov +Cc: Paolo Bonzini +Cc: +Cc: Borislav Petkov +Cc: peterz@infradead.org +Cc: Linus Torvalds +Cc: barra_cuda@katamail.com Tested-by: Stefan Bader -Tested-by: Toralf Förster +Tested-by: Toralf F¿rster Tested-by: Michele Ballabio -Signed-off-by: Peter Zijlstra Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Peter Zijlstra +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 #include @@ -69,6 +91,7 @@ Signed-off-by: Greg Kroah-Hartman + * 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 + @@ -77,17 +100,15 @@ Signed-off-by: Greg Kroah-Hartman /* --- a/include/linux/preempt.h +++ b/include/linux/preempt.h -@@ -17,6 +17,10 @@ - - #include +@@ -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 + #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 -- 2.47.3