diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-12-29 05:45:14 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-12-29 05:45:14 -0800 |
| commit | e403669ebf740531b20b7e3a70fb16de1c6a3683 (patch) | |
| tree | 6d447d135a0fcec61b5b6d85599a8bb2c6f77344 /include | |
| parent | 6caf4668db2f0dcccf78ec8f3383a8b17c3dc0f4 (diff) | |
[PATCH] Fix for more than 256 CPUs
From: Paul Jackson <pj@sgi.com>
The patch is needed to build NR_CPUS > 256.
Without this fix, you get compile errors:
include/linux/cpumask.h: In function `next_online_cpu':
include/linux/cpumask.h:56: structure has no member named `val'
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/cpumask_const_value.h | 2 | ||||
| -rw-r--r-- | include/asm-i386/mach-default/mach_apic.h | 6 | ||||
| -rw-r--r-- | include/linux/cpumask.h | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/include/asm-generic/cpumask_const_value.h b/include/asm-generic/cpumask_const_value.h index 7a4caefa4066..16ca16d286dc 100644 --- a/include/asm-generic/cpumask_const_value.h +++ b/include/asm-generic/cpumask_const_value.h @@ -3,7 +3,7 @@ typedef const cpumask_t cpumask_const_t; -#define mk_cpumask_const(map) ((cpumask_const_t)(map)) +#define mk_cpumask_const(map) (map) #define cpu_isset_const(cpu, map) cpu_isset(cpu, map) #define cpus_and_const(dst,src1,src2) cpus_and(dst, src1, src2) #define cpus_or_const(dst,src1,src2) cpus_or(dst, src1, src2) diff --git a/include/asm-i386/mach-default/mach_apic.h b/include/asm-i386/mach-default/mach_apic.h index 8875f34285bd..1d427aadfa41 100644 --- a/include/asm-i386/mach-default/mach_apic.h +++ b/include/asm-i386/mach-default/mach_apic.h @@ -5,12 +5,12 @@ #define APIC_DFR_VALUE (APIC_DFR_FLAT) -static inline cpumask_t target_cpus(void) +static inline cpumask_const_t target_cpus(void) { #ifdef CONFIG_SMP - return cpu_online_map; + return mk_cpumask_const(cpu_online_map); #else - return cpumask_of_cpu(0); + return mk_cpumask_const(cpumask_of_cpu(0)); #endif } #define TARGET_CPUS (target_cpus()) diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index c43921ec27fe..6c47954f7777 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -53,18 +53,18 @@ extern cpumask_t cpu_online_map; static inline int next_online_cpu(int cpu, cpumask_t map) { do - cpu = next_cpu_const(cpu, map); + cpu = next_cpu_const(cpu, mk_cpumask_const(map)); while (cpu < NR_CPUS && !cpu_online(cpu)); return cpu; } #define for_each_cpu(cpu, map) \ - for (cpu = first_cpu_const(map); \ + for (cpu = first_cpu_const(mk_cpumask_const(map)); \ cpu < NR_CPUS; \ - cpu = next_cpu_const(cpu,map)) + cpu = next_cpu_const(cpu,mk_cpumask_const(map))) #define for_each_online_cpu(cpu, map) \ - for (cpu = first_cpu_const(map); \ + for (cpu = first_cpu_const(mk_cpumask_const(map)); \ cpu < NR_CPUS; \ cpu = next_online_cpu(cpu,map)) |
