diff options
Diffstat (limited to 'arch/x86/include/asm/apic.h')
-rw-r--r-- | arch/x86/include/asm/apic.h | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 586b7adb8e53..474d80d3e6cc 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -66,13 +66,23 @@ static inline void default_inquire_remote_apic(int apicid) | |||
66 | } | 66 | } |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * With 82489DX we can't rely on apic feature bit | ||
70 | * retrieved via cpuid but still have to deal with | ||
71 | * such an apic chip so we assume that SMP configuration | ||
72 | * is found from MP table (64bit case uses ACPI mostly | ||
73 | * which set smp presence flag as well so we are safe | ||
74 | * to use this helper too). | ||
75 | */ | ||
76 | static inline bool apic_from_smp_config(void) | ||
77 | { | ||
78 | return smp_found_config && !disable_apic; | ||
79 | } | ||
80 | |||
81 | /* | ||
69 | * Basic functions accessing APICs. | 82 | * Basic functions accessing APICs. |
70 | */ | 83 | */ |
71 | #ifdef CONFIG_PARAVIRT | 84 | #ifdef CONFIG_PARAVIRT |
72 | #include <asm/paravirt.h> | 85 | #include <asm/paravirt.h> |
73 | #else | ||
74 | #define setup_boot_clock setup_boot_APIC_clock | ||
75 | #define setup_secondary_clock setup_secondary_APIC_clock | ||
76 | #endif | 86 | #endif |
77 | 87 | ||
78 | #ifdef CONFIG_X86_64 | 88 | #ifdef CONFIG_X86_64 |
@@ -252,6 +262,8 @@ static inline void lapic_shutdown(void) { } | |||
252 | static inline void init_apic_mappings(void) { } | 262 | static inline void init_apic_mappings(void) { } |
253 | static inline void disable_local_APIC(void) { } | 263 | static inline void disable_local_APIC(void) { } |
254 | static inline void apic_disable(void) { } | 264 | static inline void apic_disable(void) { } |
265 | # define setup_boot_APIC_clock x86_init_noop | ||
266 | # define setup_secondary_APIC_clock x86_init_noop | ||
255 | #endif /* !CONFIG_X86_LOCAL_APIC */ | 267 | #endif /* !CONFIG_X86_LOCAL_APIC */ |
256 | 268 | ||
257 | #ifdef CONFIG_X86_64 | 269 | #ifdef CONFIG_X86_64 |
@@ -300,7 +312,7 @@ struct apic { | |||
300 | int (*cpu_present_to_apicid)(int mps_cpu); | 312 | int (*cpu_present_to_apicid)(int mps_cpu); |
301 | physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); | 313 | physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); |
302 | void (*setup_portio_remap)(void); | 314 | void (*setup_portio_remap)(void); |
303 | int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); | 315 | int (*check_phys_apicid_present)(int phys_apicid); |
304 | void (*enable_apic_mode)(void); | 316 | void (*enable_apic_mode)(void); |
305 | int (*phys_pkg_id)(int cpuid_apic, int index_msb); | 317 | int (*phys_pkg_id)(int cpuid_apic, int index_msb); |
306 | 318 | ||
@@ -434,7 +446,7 @@ extern struct apic apic_x2apic_uv_x; | |||
434 | DECLARE_PER_CPU(int, x2apic_extra_bits); | 446 | DECLARE_PER_CPU(int, x2apic_extra_bits); |
435 | 447 | ||
436 | extern int default_cpu_present_to_apicid(int mps_cpu); | 448 | extern int default_cpu_present_to_apicid(int mps_cpu); |
437 | extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); | 449 | extern int default_check_phys_apicid_present(int phys_apicid); |
438 | #endif | 450 | #endif |
439 | 451 | ||
440 | static inline void default_wait_for_init_deassert(atomic_t *deassert) | 452 | static inline void default_wait_for_init_deassert(atomic_t *deassert) |
@@ -550,9 +562,9 @@ static inline int __default_cpu_present_to_apicid(int mps_cpu) | |||
550 | } | 562 | } |
551 | 563 | ||
552 | static inline int | 564 | static inline int |
553 | __default_check_phys_apicid_present(int boot_cpu_physical_apicid) | 565 | __default_check_phys_apicid_present(int phys_apicid) |
554 | { | 566 | { |
555 | return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); | 567 | return physid_isset(phys_apicid, phys_cpu_present_map); |
556 | } | 568 | } |
557 | 569 | ||
558 | #ifdef CONFIG_X86_32 | 570 | #ifdef CONFIG_X86_32 |
@@ -562,13 +574,13 @@ static inline int default_cpu_present_to_apicid(int mps_cpu) | |||
562 | } | 574 | } |
563 | 575 | ||
564 | static inline int | 576 | static inline int |
565 | default_check_phys_apicid_present(int boot_cpu_physical_apicid) | 577 | default_check_phys_apicid_present(int phys_apicid) |
566 | { | 578 | { |
567 | return __default_check_phys_apicid_present(boot_cpu_physical_apicid); | 579 | return __default_check_phys_apicid_present(phys_apicid); |
568 | } | 580 | } |
569 | #else | 581 | #else |
570 | extern int default_cpu_present_to_apicid(int mps_cpu); | 582 | extern int default_cpu_present_to_apicid(int mps_cpu); |
571 | extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); | 583 | extern int default_check_phys_apicid_present(int phys_apicid); |
572 | #endif | 584 | #endif |
573 | 585 | ||
574 | static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) | 586 | static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) |