diff options
| author | James Bottomley <jejb@raven.il.steeleye.com> | 2002-12-27 23:12:45 -0600 |
|---|---|---|
| committer | James Bottomley <jejb@raven.il.steeleye.com> | 2002-12-27 23:12:45 -0600 |
| commit | 85fe93597ac10844bc196c76c46386c6f6cf2693 (patch) | |
| tree | f9ed792869bb1076bc4a7722f636a7f1cc12a53e /include | |
| parent | 58acbf381481df951fc05b1084b5f4b79540357a (diff) | |
Enable Voyager in current kernel
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/hw_irq.h | 2 | ||||
| -rw-r--r-- | include/asm-i386/smp.h | 21 |
2 files changed, 15 insertions, 8 deletions
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 1a60daa9172e..035a6af03c63 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h @@ -131,7 +131,7 @@ static inline int unregister_profile_notifier(struct notifier_block * nb) #endif /* CONFIG_PROFILING */ -#ifdef CONFIG_SMP /*more of this file should probably be ifdefed SMP */ +#if defined(CONFIG_SMP) && !defined(CONFIG_VOYAGER) /*more of this file should probably be ifdefed SMP */ static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { if (IO_APIC_IRQ(i)) send_IPI_self(IO_APIC_VECTOR(i)); diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index 32a8f5a05a84..71d58561d39c 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h @@ -6,6 +6,7 @@ */ #ifndef __ASSEMBLY__ #include <linux/config.h> +#include <linux/kernel.h> #include <linux/threads.h> #endif @@ -83,11 +84,22 @@ extern volatile unsigned long cpu_callout_map; #define cpu_possible(cpu) (cpu_callout_map & (1<<(cpu))) #define cpu_online(cpu) (cpu_online_map & (1<<(cpu))) +#define for_each_cpu(cpu, mask) \ + for(mask = cpu_online_map; \ + cpu = __ffs(mask), mask != 0; \ + mask &= ~(1<<cpu)) + extern inline unsigned int num_online_cpus(void) { return hweight32(cpu_online_map); } +/* We don't mark CPUs online until __cpu_up(), so we need another measure */ +static inline int num_booting_cpus(void) +{ + return hweight32(cpu_callout_map); +} + extern inline int any_online_cpu(unsigned int mask) { if (mask & cpu_online_map) @@ -95,7 +107,7 @@ extern inline int any_online_cpu(unsigned int mask) return -1; } - +#ifdef CONFIG_X86_LOCAL_APIC static __inline int hard_smp_processor_id(void) { /* we don't want to mark this access volatile - bad code generation */ @@ -108,12 +120,7 @@ static __inline int logical_smp_processor_id(void) return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR)); } -/* We don't mark CPUs online until __cpu_up(), so we need another measure */ -static inline int num_booting_cpus(void) -{ - return hweight32(cpu_callout_map); -} - +#endif #endif /* !__ASSEMBLY__ */ #define NO_PROC_ID 0xFF /* No processor magic marker */ |
