summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-06-17 15:42:38 +0200
committerClark Williams <williams@redhat.com>2011-12-28 16:25:31 -0600
commit6eb107b0f837de2089217aa46f8cc371a120447d (patch)
tree71dcf859aebee5c4aa568190b350482cb3b7dd0f
parent5397e467b20bbd03ed69688d69926bf9922916f9 (diff)
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 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: