| .. | .. |
|---|
| 5 | 5 | #include <linux/cpumask.h> |
|---|
| 6 | 6 | #include <asm/percpu.h> |
|---|
| 7 | 7 | |
|---|
| 8 | | -/* |
|---|
| 9 | | - * We need the APIC definitions automatically as part of 'smp.h' |
|---|
| 10 | | - */ |
|---|
| 11 | | -#ifdef CONFIG_X86_LOCAL_APIC |
|---|
| 12 | | -# include <asm/mpspec.h> |
|---|
| 13 | | -# include <asm/apic.h> |
|---|
| 14 | | -# ifdef CONFIG_X86_IO_APIC |
|---|
| 15 | | -# include <asm/io_apic.h> |
|---|
| 16 | | -# endif |
|---|
| 17 | | -#endif |
|---|
| 18 | 8 | #include <asm/thread_info.h> |
|---|
| 19 | 9 | #include <asm/cpumask.h> |
|---|
| 20 | 10 | |
|---|
| .. | .. |
|---|
| 23 | 13 | |
|---|
| 24 | 14 | DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_map); |
|---|
| 25 | 15 | DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map); |
|---|
| 16 | +DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_die_map); |
|---|
| 26 | 17 | /* cpus sharing the last level cache: */ |
|---|
| 27 | 18 | DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map); |
|---|
| 28 | 19 | DECLARE_PER_CPU_READ_MOSTLY(u16, cpu_llc_id); |
|---|
| .. | .. |
|---|
| 131 | 122 | void native_smp_prepare_cpus(unsigned int max_cpus); |
|---|
| 132 | 123 | void calculate_max_logical_packages(void); |
|---|
| 133 | 124 | void native_smp_cpus_done(unsigned int max_cpus); |
|---|
| 134 | | -void common_cpu_up(unsigned int cpunum, struct task_struct *tidle); |
|---|
| 125 | +int common_cpu_up(unsigned int cpunum, struct task_struct *tidle); |
|---|
| 135 | 126 | int native_cpu_up(unsigned int cpunum, struct task_struct *tidle); |
|---|
| 136 | 127 | int native_cpu_disable(void); |
|---|
| 137 | 128 | int common_cpu_die(unsigned int cpu); |
|---|
| .. | .. |
|---|
| 141 | 132 | void play_dead_common(void); |
|---|
| 142 | 133 | void wbinvd_on_cpu(int cpu); |
|---|
| 143 | 134 | int wbinvd_on_all_cpus(void); |
|---|
| 135 | +void cond_wakeup_cpu0(void); |
|---|
| 144 | 136 | |
|---|
| 137 | +void native_smp_send_reschedule(int cpu); |
|---|
| 145 | 138 | void native_send_call_func_ipi(const struct cpumask *mask); |
|---|
| 146 | 139 | void native_send_call_func_single_ipi(int cpu); |
|---|
| 147 | 140 | void x86_idle_thread_init(unsigned int cpu, struct task_struct *idle); |
|---|
| 148 | 141 | |
|---|
| 149 | 142 | void smp_store_boot_cpu_info(void); |
|---|
| 150 | 143 | void smp_store_cpu_info(int id); |
|---|
| 144 | + |
|---|
| 145 | +asmlinkage __visible void smp_reboot_interrupt(void); |
|---|
| 146 | +__visible void smp_reschedule_interrupt(struct pt_regs *regs); |
|---|
| 147 | +__visible void smp_call_function_interrupt(struct pt_regs *regs); |
|---|
| 148 | +__visible void smp_call_function_single_interrupt(struct pt_regs *r); |
|---|
| 149 | + |
|---|
| 151 | 150 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) |
|---|
| 152 | 151 | #define cpu_acpi_id(cpu) per_cpu(x86_cpu_to_acpiid, cpu) |
|---|
| 153 | 152 | |
|---|
| .. | .. |
|---|
| 156 | 155 | * from the initial startup. We map APIC_BASE very early in page_setup(), |
|---|
| 157 | 156 | * so this is correct in the x86 case. |
|---|
| 158 | 157 | */ |
|---|
| 159 | | -#define raw_smp_processor_id() (this_cpu_read(cpu_number)) |
|---|
| 158 | +#define raw_smp_processor_id() this_cpu_read(cpu_number) |
|---|
| 159 | +#define __smp_processor_id() __this_cpu_read(cpu_number) |
|---|
| 160 | 160 | |
|---|
| 161 | 161 | #ifdef CONFIG_X86_32 |
|---|
| 162 | 162 | extern int safe_smp_processor_id(void); |
|---|