summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/preempt.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-09-28 18:11:18 +0200
committerIngo Molnar <mingo@kernel.org>2015-10-06 17:08:18 +0200
commitd87b7a33794f52226131f93cbc9db03274d9fecf (patch)
treee1ccd2b403395dc1e9c7e5f3ba2c04960026af39 /arch/x86/include/asm/preempt.h
parentda7142e2ed735e1c1bef5a757dc55de35c65fbd6 (diff)
downloadlinux-0-day-d87b7a33794f52226131f93cbc9db03274d9fecf.tar.gz
linux-0-day-d87b7a33794f52226131f93cbc9db03274d9fecf.tar.xz
sched/core, sched/x86: Kill thread_info::saved_preempt_count
With the introduction of the context switch preempt_count invariant, and the demise of PREEMPT_ACTIVE, its pointless to save/restore the per-cpu preemption count, it must always be 2. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/preempt.h')
-rw-r--r--arch/x86/include/asm/preempt.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h
index 01e700d392cba..01bcde84d3e40 100644
--- a/arch/x86/include/asm/preempt.h
+++ b/arch/x86/include/asm/preempt.h
@@ -30,12 +30,9 @@ static __always_inline void preempt_count_set(int pc)
/*
* must be macros to avoid header recursion hell
*/
-#define init_task_preempt_count(p) do { \
- task_thread_info(p)->saved_preempt_count = FORK_PREEMPT_COUNT; \
-} while (0)
+#define init_task_preempt_count(p) do { } while (0)
#define init_idle_preempt_count(p, cpu) do { \
- task_thread_info(p)->saved_preempt_count = PREEMPT_ENABLED; \
per_cpu(__preempt_count, (cpu)) = PREEMPT_ENABLED; \
} while (0)