hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/x86/include/asm/smp.h
....@@ -5,16 +5,6 @@
55 #include <linux/cpumask.h>
66 #include <asm/percpu.h>
77
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
188 #include <asm/thread_info.h>
199 #include <asm/cpumask.h>
2010
....@@ -23,6 +13,7 @@
2313
2414 DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_map);
2515 DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map);
16
+DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_die_map);
2617 /* cpus sharing the last level cache: */
2718 DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);
2819 DECLARE_PER_CPU_READ_MOSTLY(u16, cpu_llc_id);
....@@ -131,7 +122,7 @@
131122 void native_smp_prepare_cpus(unsigned int max_cpus);
132123 void calculate_max_logical_packages(void);
133124 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);
135126 int native_cpu_up(unsigned int cpunum, struct task_struct *tidle);
136127 int native_cpu_disable(void);
137128 int common_cpu_die(unsigned int cpu);
....@@ -141,13 +132,21 @@
141132 void play_dead_common(void);
142133 void wbinvd_on_cpu(int cpu);
143134 int wbinvd_on_all_cpus(void);
135
+void cond_wakeup_cpu0(void);
144136
137
+void native_smp_send_reschedule(int cpu);
145138 void native_send_call_func_ipi(const struct cpumask *mask);
146139 void native_send_call_func_single_ipi(int cpu);
147140 void x86_idle_thread_init(unsigned int cpu, struct task_struct *idle);
148141
149142 void smp_store_boot_cpu_info(void);
150143 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
+
151150 #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
152151 #define cpu_acpi_id(cpu) per_cpu(x86_cpu_to_acpiid, cpu)
153152
....@@ -156,7 +155,8 @@
156155 * from the initial startup. We map APIC_BASE very early in page_setup(),
157156 * so this is correct in the x86 case.
158157 */
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)
160160
161161 #ifdef CONFIG_X86_32
162162 extern int safe_smp_processor_id(void);