]>
git.proxmox.com Git - mirror_ubuntu-kernels.git/blob - include/asm-x86/smp_32.h
6 extern cpumask_t cpu_callin_map
;
8 extern void (*mtrr_hook
)(void);
9 extern void zap_low_mappings(void);
13 * This function is needed by all SMP systems. It must _always_ be valid
14 * from the initial startup. We map APIC_BASE very early in page_setup(),
15 * so this is correct in the x86 case.
17 DECLARE_PER_CPU(int, cpu_number
);
18 #define raw_smp_processor_id() (x86_read_percpu(cpu_number))
20 extern int safe_smp_processor_id(void);
22 /* We don't mark CPUs online until __cpu_up(), so we need another measure */
23 static inline int num_booting_cpus(void)
25 return cpus_weight(cpu_callout_map
);
28 #else /* CONFIG_SMP */
29 #define safe_smp_processor_id() 0
30 #endif /* !CONFIG_SMP */
32 #endif /* !ASSEMBLY */