summaryrefslogtreecommitdiffstats
path: root/patches/0089-cpu-rt-variants.patch.patch
blob: bef2d01bff378a73ba1fa5fb47bee77649e4d213 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 74f033b6ccaab2a2784ccebef4e709583e7731f2 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 17 Jun 2011 15:42:38 +0200
Subject: [PATCH 089/274] cpu-rt-variants.patch

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 include/linux/smp.h |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/smp.h b/include/linux/smp.h
index 10530d9..04e7ed9 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -219,6 +219,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:
-- 
1.7.10.4