summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-06-17 13:42:38 (GMT)
committerScott Wood <scottwood@freescale.com>2014-05-14 18:38:02 (GMT)
commitd697065a324409ddfac52e3fd499a91df2e44c77 (patch)
treed088f9ce403d02c0c7f8cf66ea073710ad3ab20d /include/linux
parent7f11536abb58e277f1c29eef8b5e40b3c11beee5 (diff)
downloadlinux-fsl-qoriq-d697065a324409ddfac52e3fd499a91df2e44c77.tar.xz
cpu-rt-variants.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux')
-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: