]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
local-vars-migrate-disable.patch
authorThomas Gleixner <tglx@linutronix.de>
Tue, 28 Jun 2011 18:42:16 +0000 (20:42 +0200)
committerMichal Sojka <sojka@merica.cz>
Sun, 13 Sep 2015 07:47:20 +0000 (09:47 +0200)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/percpu.h

index 24984142dbc8de113e09ae92c79dc6d390d47eef..53a60a51c758d3d1ec30a14f40201e0554857671 100644 (file)
         PERCPU_MODULE_RESERVE)
 #endif
 
+#ifdef CONFIG_PREEMPT_RT_FULL
+
+#define get_local_var(var) (*({                \
+              migrate_disable();       \
+              this_cpu_ptr(&var);      }))
+
+#define put_local_var(var) do {        \
+       (void)&(var);           \
+       migrate_enable();       \
+} while (0)
+
+# define get_local_ptr(var) ({         \
+               migrate_disable();      \
+               this_cpu_ptr(var);      })
+
+# define put_local_ptr(var) do {       \
+       (void)(var);                    \
+       migrate_enable();               \
+} while (0)
+
+#else
+
 #define get_local_var(var)     get_cpu_var(var)
 #define put_local_var(var)     put_cpu_var(var)
 #define get_local_ptr(var)     get_cpu_ptr(var)
 #define put_local_ptr(var)     put_cpu_ptr(var)
 
+#endif
+
 /* minimum unit size, also is the maximum supported allocation size */
 #define PCPU_MIN_UNIT_SIZE             PFN_ALIGN(32 << 10)