diff options
Diffstat (limited to 'arch/x86/include/asm/apic.h')
-rw-r--r-- | arch/x86/include/asm/apic.h | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 3c896946f4cc..b8a3484d69e9 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -307,8 +307,6 @@ struct apic { | |||
307 | 307 | ||
308 | void (*setup_apic_routing)(void); | 308 | void (*setup_apic_routing)(void); |
309 | int (*multi_timer_check)(int apic, int irq); | 309 | 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); | 310 | int (*cpu_present_to_apicid)(int mps_cpu); |
313 | void (*apicid_to_cpu_present)(int phys_apicid, physid_mask_t *retmap); | 311 | void (*apicid_to_cpu_present)(int phys_apicid, physid_mask_t *retmap); |
314 | void (*setup_portio_remap)(void); | 312 | void (*setup_portio_remap)(void); |
@@ -356,6 +354,23 @@ struct apic { | |||
356 | void (*icr_write)(u32 low, u32 high); | 354 | void (*icr_write)(u32 low, u32 high); |
357 | void (*wait_icr_idle)(void); | 355 | void (*wait_icr_idle)(void); |
358 | u32 (*safe_wait_icr_idle)(void); | 356 | u32 (*safe_wait_icr_idle)(void); |
357 | |||
358 | #ifdef CONFIG_X86_32 | ||
359 | /* | ||
360 | * Called very early during boot from get_smp_config(). It should | ||
361 | * return the logical apicid. x86_[bios]_cpu_to_apicid is | ||
362 | * initialized before this function is called. | ||
363 | * | ||
364 | * If logical apicid can't be determined that early, the function | ||
365 | * may return BAD_APICID. Logical apicid will be configured after | ||
366 | * init_apic_ldr() while bringing up CPUs. Note that NUMA affinity | ||
367 | * won't be applied properly during early boot in this case. | ||
368 | */ | ||
369 | int (*x86_32_early_logical_apicid)(int cpu); | ||
370 | |||
371 | /* determine CPU -> NUMA node mapping */ | ||
372 | int (*x86_32_numa_cpu_node)(int cpu); | ||
373 | #endif | ||
359 | }; | 374 | }; |
360 | 375 | ||
361 | /* | 376 | /* |
@@ -503,6 +518,11 @@ extern struct apic apic_noop; | |||
503 | 518 | ||
504 | extern struct apic apic_default; | 519 | extern struct apic apic_default; |
505 | 520 | ||
521 | static inline int noop_x86_32_early_logical_apicid(int cpu) | ||
522 | { | ||
523 | return BAD_APICID; | ||
524 | } | ||
525 | |||
506 | /* | 526 | /* |
507 | * Set up the logical destination ID. | 527 | * Set up the logical destination ID. |
508 | * | 528 | * |
@@ -522,7 +542,7 @@ static inline int default_phys_pkg_id(int cpuid_apic, int index_msb) | |||
522 | return cpuid_apic >> index_msb; | 542 | return cpuid_apic >> index_msb; |
523 | } | 543 | } |
524 | 544 | ||
525 | extern int default_apicid_to_node(int logical_apicid); | 545 | extern int default_x86_32_numa_cpu_node(int cpu); |
526 | 546 | ||
527 | #endif | 547 | #endif |
528 | 548 | ||
@@ -558,12 +578,6 @@ static inline void default_ioapic_phys_id_map(physid_mask_t *phys_map, physid_ma | |||
558 | *retmap = *phys_map; | 578 | *retmap = *phys_map; |
559 | } | 579 | } |
560 | 580 | ||
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) | 581 | static inline int __default_cpu_present_to_apicid(int mps_cpu) |
568 | { | 582 | { |
569 | if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) | 583 | if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) |
@@ -596,8 +610,4 @@ extern int default_check_phys_apicid_present(int phys_apicid); | |||
596 | 610 | ||
597 | #endif /* CONFIG_X86_LOCAL_APIC */ | 611 | #endif /* CONFIG_X86_LOCAL_APIC */ |
598 | 612 | ||
599 | #ifdef CONFIG_X86_32 | ||
600 | extern u8 cpu_2_logical_apicid[NR_CPUS]; | ||
601 | #endif | ||
602 | |||
603 | #endif /* _ASM_X86_APIC_H */ | 613 | #endif /* _ASM_X86_APIC_H */ |