diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-06-28 18:42:16 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-02-13 22:20:41 (GMT) |
commit | 9139a5a61f315a2c56bb71df6fbb65df7d5726b5 (patch) | |
tree | 760a07b9ec2d1ae183585135ee2f64cf3a3ce087 | |
parent | 2fa103d7217c73b4152a649f77a29e7830b371b1 (diff) | |
download | linux-fsl-qoriq-9139a5a61f315a2c56bb71df6fbb65df7d5726b5.tar.xz |
local-vars-migrate-disable.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | include/linux/percpu.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index d273604..f05adf5 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -48,10 +48,30 @@ preempt_enable(); \ } while (0) -#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) +#ifndef CONFIG_PREEMPT_RT_FULL +# 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) +#else +# define get_local_var(var) (*({ \ + migrate_disable(); \ + &__get_cpu_var(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) +#endif /* minimum unit size, also is the maximum supported allocation size */ #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10) |