local-vars-migrate-disable.patch

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Thomas Gleixner 2011-06-28 20:42:16 +02:00 committed by Alibek Omarov
parent cf366d5f66
commit cb21c9a291
1 changed files with 24 additions and 4 deletions

View File

@ -49,10 +49,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)