summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-06-17 13:42:38 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:18:58 (GMT)
commit360e2fa4cd8b6e594b773508fc3fc1b03d8a93cd (patch)
treec3e2a8cc235e3f5b4115289b741e11f3652a3406
parent73b79a694e6e9658207e68f9ddea57101e97ca4e (diff)
downloadlinux-fsl-qoriq-360e2fa4cd8b6e594b773508fc3fc1b03d8a93cd.tar.xz
cpu-rt-variants.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--include/linux/smp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 731f523..f30c7b1 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -188,6 +188,14 @@ static inline void __smp_call_function_single(int cpuid,
#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: