diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-06-10 10:09:12 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-06-10 10:09:12 -0700 |
| commit | d0d8e5a6d1eb85c278829adc988eda09f43c190e (patch) | |
| tree | 5b7f512e91ff452b869d9ef9b02aafb8cccc1a4c /include | |
| parent | 9d7a7fafdc2415d961f4716694e707cea92670d2 (diff) | |
[PATCH] fix TARGET_CPUS inconsistency
From: "Martin J. Bligh" <mbligh@aracnet.com>
Patch from Martin Bligh, based on observations by Andrew Theurer and Bill
Irwin.
TARGET_CPUS is used as a cpu mask by some things, and an apic mask for
others. For SMP, that doesn't matter (they're the same), but for Summit it
does. This patch changes TARGET_CPUS to consistently be a cpu mask
everywhere. Should be a no-op for normal platforms.
Invalid arguments to cpu_mask_to_apicid for clustered apic mode
architectures will now return the broadcast apicid, in order to ensure
someone still gets the interrupt (was the default init value, and is
safest).
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/mach-bigsmp/mach_apic.h | 4 | ||||
| -rw-r--r-- | include/asm-i386/mach-numaq/mach_apic.h | 2 | ||||
| -rw-r--r-- | include/asm-i386/mach-summit/mach_apic.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-i386/mach-bigsmp/mach_apic.h b/include/asm-i386/mach-bigsmp/mach_apic.h index 519571a84945..fcd4036eb41f 100644 --- a/include/asm-i386/mach-bigsmp/mach_apic.h +++ b/include/asm-i386/mach-bigsmp/mach_apic.h @@ -22,7 +22,7 @@ static inline int apic_id_registered(void) #define APIC_DFR_VALUE (APIC_DFR_CLUSTER) static inline unsigned long target_cpus(void) { - return ((cpu_online_map < 0xf)?cpu_online_map:0xf); + return cpu_online_map; } #define TARGET_CPUS (target_cpus()) @@ -151,7 +151,7 @@ static inline unsigned int cpu_mask_to_apicid (unsigned long cpumask) if (apicid_cluster(apicid) != apicid_cluster(new_apicid)){ printk ("%s: Not a valid mask!\n",__FUNCTION__); - return TARGET_CPUS; + return 0xFF; } apicid = apicid | new_apicid; cpus_found++; diff --git a/include/asm-i386/mach-numaq/mach_apic.h b/include/asm-i386/mach-numaq/mach_apic.h index c0cdcc5aee41..c02f1cf1ea2e 100644 --- a/include/asm-i386/mach-numaq/mach_apic.h +++ b/include/asm-i386/mach-numaq/mach_apic.h @@ -6,7 +6,7 @@ #define APIC_DFR_VALUE (APIC_DFR_CLUSTER) -#define TARGET_CPUS (0xf) +#define TARGET_CPUS (~0UL) #define NO_BALANCE_IRQ (1) #define esr_disable (1) diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h index 255444642524..f13289fef06c 100644 --- a/include/asm-i386/mach-summit/mach_apic.h +++ b/include/asm-i386/mach-summit/mach_apic.h @@ -20,7 +20,7 @@ static inline unsigned long xapic_phys_to_log_apicid(int phys_apic) static inline unsigned long target_cpus(void) { - return XAPIC_DEST_CPUS_MASK; + return (~0UL); } #define TARGET_CPUS (target_cpus()) @@ -141,7 +141,7 @@ static inline unsigned int cpu_mask_to_apicid (unsigned long cpumask) if (apicid_cluster(apicid) != apicid_cluster(new_apicid)){ printk ("%s: Not a valid mask!\n",__FUNCTION__); - return TARGET_CPUS; + return 0xFF; } apicid = apicid | new_apicid; cpus_found++; |
