diff options
Diffstat (limited to 'arch/x86/include/asm/apic.h')
-rw-r--r-- | arch/x86/include/asm/apic.h | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 3c896946f4c..a279d98ea95 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -220,7 +220,6 @@ extern void enable_IR_x2apic(void); | |||
220 | 220 | ||
221 | extern int get_physical_broadcast(void); | 221 | extern int get_physical_broadcast(void); |
222 | 222 | ||
223 | extern void apic_disable(void); | ||
224 | extern int lapic_get_maxlvt(void); | 223 | extern int lapic_get_maxlvt(void); |
225 | extern void clear_local_APIC(void); | 224 | extern void clear_local_APIC(void); |
226 | extern void connect_bsp_APIC(void); | 225 | extern void connect_bsp_APIC(void); |
@@ -228,7 +227,6 @@ extern void disconnect_bsp_APIC(int virt_wire_setup); | |||
228 | extern void disable_local_APIC(void); | 227 | extern void disable_local_APIC(void); |
229 | extern void lapic_shutdown(void); | 228 | extern void lapic_shutdown(void); |
230 | extern int verify_local_APIC(void); | 229 | extern int verify_local_APIC(void); |
231 | extern void cache_APIC_registers(void); | ||
232 | extern void sync_Arb_IDs(void); | 230 | extern void sync_Arb_IDs(void); |
233 | extern void init_bsp_APIC(void); | 231 | extern void init_bsp_APIC(void); |
234 | extern void setup_local_APIC(void); | 232 | extern void setup_local_APIC(void); |
@@ -239,8 +237,7 @@ void register_lapic_address(unsigned long address); | |||
239 | extern void setup_boot_APIC_clock(void); | 237 | extern void setup_boot_APIC_clock(void); |
240 | extern void setup_secondary_APIC_clock(void); | 238 | extern void setup_secondary_APIC_clock(void); |
241 | extern int APIC_init_uniprocessor(void); | 239 | extern int APIC_init_uniprocessor(void); |
242 | extern void enable_NMI_through_LVT0(void); | 240 | extern int apic_force_enable(unsigned long addr); |
243 | extern int apic_force_enable(void); | ||
244 | 241 | ||
245 | /* | 242 | /* |
246 | * On 32bit this is mach-xxx local | 243 | * On 32bit this is mach-xxx local |
@@ -261,7 +258,6 @@ static inline void lapic_shutdown(void) { } | |||
261 | #define local_apic_timer_c2_ok 1 | 258 | #define local_apic_timer_c2_ok 1 |
262 | static inline void init_apic_mappings(void) { } | 259 | static inline void init_apic_mappings(void) { } |
263 | static inline void disable_local_APIC(void) { } | 260 | static inline void disable_local_APIC(void) { } |
264 | static inline void apic_disable(void) { } | ||
265 | # define setup_boot_APIC_clock x86_init_noop | 261 | # define setup_boot_APIC_clock x86_init_noop |
266 | # define setup_secondary_APIC_clock x86_init_noop | 262 | # define setup_secondary_APIC_clock x86_init_noop |
267 | #endif /* !CONFIG_X86_LOCAL_APIC */ | 263 | #endif /* !CONFIG_X86_LOCAL_APIC */ |
@@ -307,8 +303,6 @@ struct apic { | |||
307 | 303 | ||
308 | void (*setup_apic_routing)(void); | 304 | void (*setup_apic_routing)(void); |
309 | int (*multi_timer_check)(int apic, int irq); | 305 | int (*multi_timer_check)(int apic, int irq); |
310 | int (*apicid_to_node)(int logical_apicid); | ||
311 | int (*cpu_to_logical_apicid)(int cpu); | ||
312 | int (*cpu_present_to_apicid)(int mps_cpu); | 306 | int (*cpu_present_to_apicid)(int mps_cpu); |
313 | void (*apicid_to_cpu_present)(int phys_apicid, physid_mask_t *retmap); | 307 | void (*apicid_to_cpu_present)(int phys_apicid, physid_mask_t *retmap); |
314 | void (*setup_portio_remap)(void); | 308 | void (*setup_portio_remap)(void); |
@@ -356,6 +350,23 @@ struct apic { | |||
356 | void (*icr_write)(u32 low, u32 high); | 350 | void (*icr_write)(u32 low, u32 high); |
357 | void (*wait_icr_idle)(void); | 351 | void (*wait_icr_idle)(void); |
358 | u32 (*safe_wait_icr_idle)(void); | 352 | u32 (*safe_wait_icr_idle)(void); |
353 | |||
354 | #ifdef CONFIG_X86_32 | ||
355 | /* | ||
356 | * Called very early during boot from get_smp_config(). It should | ||
357 | * return the logical apicid. x86_[bios]_cpu_to_apicid is | ||
358 | * initialized before this function is called. | ||
359 | * | ||
360 | * If logical apicid can't be determined that early, the function | ||
361 | * may return BAD_APICID. Logical apicid will be configured after | ||
362 | * init_apic_ldr() while bringing up CPUs. Note that NUMA affinity | ||
363 | * won't be applied properly during early boot in this case. | ||
364 | */ | ||
365 | int (*x86_32_early_logical_apicid)(int cpu); | ||
366 | |||
367 | /* determine CPU -> NUMA node mapping */ | ||
368 | int (*x86_32_numa_cpu_node)(int cpu); | ||
369 | #endif | ||
359 | }; | 370 | }; |
360 | 371 | ||
361 | /* | 372 | /* |
@@ -503,6 +514,11 @@ extern struct apic apic_noop; | |||
503 | 514 | ||
504 | extern struct apic apic_default; | 515 | extern struct apic apic_default; |
505 | 516 | ||
517 | static inline int noop_x86_32_early_logical_apicid(int cpu) | ||
518 | { | ||
519 | return BAD_APICID; | ||
520 | } | ||
521 | |||
506 | /* | 522 | /* |
507 | * Set up the logical destination ID. | 523 | * Set up the logical destination ID. |
508 | * | 524 | * |
@@ -522,7 +538,7 @@ static inline int default_phys_pkg_id(int cpuid_apic, int index_msb) | |||
522 | return cpuid_apic >> index_msb; | 538 | return cpuid_apic >> index_msb; |
523 | } | 539 | } |
524 | 540 | ||
525 | extern int default_apicid_to_node(int logical_apicid); | 541 | extern int default_x86_32_numa_cpu_node(int cpu); |
526 | 542 | ||
527 | #endif | 543 | #endif |
528 | 544 | ||
@@ -558,12 +574,6 @@ static inline void default_ioapic_phys_id_map(physid_mask_t *phys_map, physid_ma | |||
558 | *retmap = *phys_map; | 574 | *retmap = *phys_map; |
559 | } | 575 | } |
560 | 576 | ||
561 | /* Mapping from cpu number to logical apicid */ | ||
562 | static inline int default_cpu_to_logical_apicid(int cpu) | ||
563 | { | ||
564 | return 1 << cpu; | ||
565 | } | ||
566 | |||
567 | static inline int __default_cpu_present_to_apicid(int mps_cpu) | 577 | static inline int __default_cpu_present_to_apicid(int mps_cpu) |
568 | { | 578 | { |
569 | if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) | 579 | if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) |
@@ -596,8 +606,4 @@ extern int default_check_phys_apicid_present(int phys_apicid); | |||
596 | 606 | ||
597 | #endif /* CONFIG_X86_LOCAL_APIC */ | 607 | #endif /* CONFIG_X86_LOCAL_APIC */ |
598 | 608 | ||
599 | #ifdef CONFIG_X86_32 | ||
600 | extern u8 cpu_2_logical_apicid[NR_CPUS]; | ||
601 | #endif | ||
602 | |||
603 | #endif /* _ASM_X86_APIC_H */ | 609 | #endif /* _ASM_X86_APIC_H */ |