28 lines
874 B
Diff
28 lines
874 B
Diff
|
Subject: cpu-rt-variants.patch
|
||
|
From: Thomas Gleixner <tglx@linutronix.de>
|
||
|
Date: Fri, 17 Jun 2011 15:42:38 +0200
|
||
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz
|
||
|
|
||
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||
|
---
|
||
|
include/linux/smp.h | 8 ++++++++
|
||
|
1 file changed, 8 insertions(+)
|
||
|
|
||
|
--- a/include/linux/smp.h
|
||
|
+++ b/include/linux/smp.h
|
||
|
@@ -182,6 +182,14 @@ static inline void kick_all_cpus_sync(vo
|
||
|
#define get_cpu() ({ preempt_disable(); smp_processor_id(); })
|
||
|
#define put_cpu() preempt_enable()
|
||
|
|
||
|
+#ifndef CONFIG_PREEMPT_RT_FULL
|
||
|
+# define get_cpu_light() get_cpu()
|
||
|
+# define put_cpu_light() put_cpu()
|
||
|
+#else
|
||
|
+# define get_cpu_light() ({ migrate_disable(); smp_processor_id(); })
|
||
|
+# define put_cpu_light() migrate_enable()
|
||
|
+#endif
|
||
|
+
|
||
|
/*
|
||
|
* Callback to arch code if there's nosmp or maxcpus=0 on the
|
||
|
* boot command line:
|