aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-06-17 15:42:38 +0200
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2013-05-20 13:45:52 -0400
commitf1c57be94a4125980224e5bc6605fd5b48438b1f (patch)
tree9dbaacebb5ed5038e48292f1964514cbd3c09f93 /include
parent5276245d45d221372d8cb826e55ed720302d557c (diff)
cpu-rt-variants.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-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 8cc38d3bab0c..e6c58d8796b3 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -173,6 +173,14 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func,
#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: