diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-02-11 13:56:44 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-02-11 13:56:44 +1100 |
commit | 7a38f91dc99e09a3a1f61e66b37e0eb87d00884d (patch) | |
tree | d534a3bd2521e9a0038451f0995e5f8e05a3cb02 /include/linux | |
parent | 652a8756a15e17eeb95c48767bdd945b2cbfacac (diff) | |
parent | e976607a52782f69974fed726484e074e4ddc085 (diff) |
Merge branch 'quilt/rr'
Conflicts:
arch/x86/include/asm/es7000/apic.h
arch/x86/include/asm/numaq/apic.h
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
drivers/net/virtio_net.c
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cpumask.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 9f315382610b..1846731651d2 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -324,8 +324,6 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu) [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ } } -#define CPU_MASK_ALL_PTR (&CPU_MASK_ALL) - #else #define CPU_MASK_ALL \ @@ -334,10 +332,6 @@ static inline const struct cpumask *get_cpu_mask(unsigned int cpu) [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ } } -/* cpu_mask_all is in init/main.c */ -extern cpumask_t cpu_mask_all; -#define CPU_MASK_ALL_PTR (&cpu_mask_all) - #endif #define CPU_MASK_NONE \ @@ -482,16 +476,26 @@ int __next_cpu_nr(int n, const cpumask_t *srcp); * only one CPU. */ -extern const struct cpumask *const cpu_possible_mask; -extern const struct cpumask *const cpu_online_mask; -extern const struct cpumask *const cpu_present_mask; -extern const struct cpumask *const cpu_active_mask; - -/* These strip const, as traditionally they weren't const. */ -#define cpu_possible_map (*(cpumask_t *)cpu_possible_mask) -#define cpu_online_map (*(cpumask_t *)cpu_online_mask) -#define cpu_present_map (*(cpumask_t *)cpu_present_mask) -#define cpu_active_map (*(cpumask_t *)cpu_active_mask) +#define cpu_possible_mask \ + ((const struct cpumask *)to_cpumask(__cpu_possible_bits)) +#define cpu_online_mask \ + ((const struct cpumask *)to_cpumask(__cpu_online_bits)) +#define cpu_present_mask \ + ((const struct cpumask *)to_cpumask(__cpu_present_bits)) +#define cpu_active_mask \ + ((const struct cpumask *)to_cpumask(__cpu_active_bits)) + +/* Deprecated non-const versions. */ +#define cpu_possible_map (*to_cpumask(__cpu_possible_bits)) +#define cpu_online_map (*to_cpumask(__cpu_online_bits)) +#define cpu_present_map (*to_cpumask(__cpu_present_bits)) +#define cpu_active_map (*to_cpumask(__cpu_active_bits)) + +/* Don't use these directly: use cpu_*_mask, set_cpu_* or init_cpu_*. */ +extern unsigned long __cpu_possible_bits[]; +extern unsigned long __cpu_online_bits[]; +extern unsigned long __cpu_present_bits[]; +extern unsigned long __cpu_active_bits[]; #if NR_CPUS > 1 #define num_online_cpus() cpumask_weight(cpu_online_mask) |