diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-08-11 15:14:58 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-02-15 10:32:50 -0600 |
commit | 4744b0dbe16c0a8195b825316b21b83d706efbff (patch) | |
tree | 887ef7e210114fceef34bacecbae03d7a26f57f9 /include/linux/smp.h | |
parent | dce5b35c195cf474a34e93d101cc1420eb285f51 (diff) |
sched: Generic migrate_disable
Make migrate_disable() be a preempt_disable() for !rt kernels. This
allows generic code to use it but still enforces that these code
sections stay relatively small.
A preemptible migrate_disable() accessible for general use would allow
people growing arbitrary per-cpu crap instead of clean these things
up.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-275i87sl8e1jcamtchmehonm@git.kernel.org
Diffstat (limited to 'include/linux/smp.h')
-rw-r--r-- | include/linux/smp.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h index 94c8430da063..78fd0a26fa05 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -172,13 +172,8 @@ 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 +#define get_cpu_light() ({ migrate_disable(); smp_processor_id(); }) +#define put_cpu_light() migrate_enable() /* * Callback to arch code if there's nosmp or maxcpus=0 on the |