diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2002-07-26 01:28:20 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-07-26 01:28:20 -0700 |
| commit | 58ce95082c6afaf6f402456c364ce47962efb697 (patch) | |
| tree | 4c81f7e40589877b60112d913c601726995b62d9 /include | |
| parent | c5e062079a7090891ea5cd1b23a7eab52b156b2a (diff) | |
[PATCH] Hot-plug CPU Boot Rewrite for i386
This modifies the i386 boot sequence to "plug in" CPUs one at a
time. This is the minimal change to make it work (the CPUs are
brought up as normal during the "smp_prepare_cpus()" probe phase).
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-i386/apic.h | 3 | ||||
| -rw-r--r-- | include/asm-i386/smp.h | 15 |
2 files changed, 10 insertions, 8 deletions
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index d36b2f10f731..3947866376d1 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h @@ -76,7 +76,8 @@ extern void init_bsp_APIC (void); extern void setup_local_APIC (void); extern void init_apic_mappings (void); extern void smp_local_timer_interrupt (struct pt_regs * regs); -extern void setup_APIC_clocks (void); +extern void setup_boot_APIC_clock (void); +extern void setup_secondary_APIC_clock (void); extern void setup_apic_nmi_watchdog (void); extern inline void nmi_watchdog_tick (struct pt_regs * regs); extern int APIC_init_uniprocessor (void); diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index 69c872158b54..6b116b38a4e2 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h @@ -79,19 +79,13 @@ extern volatile int cpu_to_logical_apicid[NR_CPUS]; extern volatile int logical_apicid_to_cpu[MAX_APICID]; /* - * General functions that each host system must provide. - */ - -extern void smp_boot_cpus(void); -extern void smp_store_cpu_info(int id); /* Store per CPU info (like the initial udelay numbers */ - -/* * This function is needed by all SMP systems. It must _always_ be valid * from the initial startup. We map APIC_BASE very early in page_setup(), * so this is correct in the x86 case. */ #define smp_processor_id() (current_thread_info()->cpu) +#define cpu_possible(cpu) (phys_cpu_present_map & (1<<(cpu))) #define cpu_online(cpu) (cpu_online_map & (1<<(cpu))) extern inline unsigned int num_online_cpus(void) @@ -119,6 +113,13 @@ static __inline int logical_smp_processor_id(void) return GET_APIC_LOGICAL_ID(*(unsigned long *)(APIC_BASE+APIC_LDR)); } +extern volatile unsigned long cpu_callout_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); +} + #endif /* !__ASSEMBLY__ */ #define NO_PROC_ID 0xFF /* No processor magic marker */ |
