diff options
Diffstat (limited to 'arch/x86/include/asm/apic.h')
-rw-r--r-- | arch/x86/include/asm/apic.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index b4ac2cdcb64f..1fa03e04ae44 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -373,6 +373,7 @@ extern atomic_t init_deasserted; | |||
373 | extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip); | 373 | extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip); |
374 | #endif | 374 | #endif |
375 | 375 | ||
376 | #ifdef CONFIG_X86_LOCAL_APIC | ||
376 | static inline u32 apic_read(u32 reg) | 377 | static inline u32 apic_read(u32 reg) |
377 | { | 378 | { |
378 | return apic->read(reg); | 379 | return apic->read(reg); |
@@ -403,10 +404,19 @@ static inline u32 safe_apic_wait_icr_idle(void) | |||
403 | return apic->safe_wait_icr_idle(); | 404 | return apic->safe_wait_icr_idle(); |
404 | } | 405 | } |
405 | 406 | ||
407 | #else /* CONFIG_X86_LOCAL_APIC */ | ||
408 | |||
409 | static inline u32 apic_read(u32 reg) { return 0; } | ||
410 | static inline void apic_write(u32 reg, u32 val) { } | ||
411 | static inline u64 apic_icr_read(void) { return 0; } | ||
412 | static inline void apic_icr_write(u32 low, u32 high) { } | ||
413 | static inline void apic_wait_icr_idle(void) { } | ||
414 | static inline u32 safe_apic_wait_icr_idle(void) { return 0; } | ||
415 | |||
416 | #endif /* CONFIG_X86_LOCAL_APIC */ | ||
406 | 417 | ||
407 | static inline void ack_APIC_irq(void) | 418 | static inline void ack_APIC_irq(void) |
408 | { | 419 | { |
409 | #ifdef CONFIG_X86_LOCAL_APIC | ||
410 | /* | 420 | /* |
411 | * ack_APIC_irq() actually gets compiled as a single instruction | 421 | * ack_APIC_irq() actually gets compiled as a single instruction |
412 | * ... yummie. | 422 | * ... yummie. |
@@ -414,7 +424,6 @@ static inline void ack_APIC_irq(void) | |||
414 | 424 | ||
415 | /* Docs say use 0 for future compatibility */ | 425 | /* Docs say use 0 for future compatibility */ |
416 | apic_write(APIC_EOI, 0); | 426 | apic_write(APIC_EOI, 0); |
417 | #endif | ||
418 | } | 427 | } |
419 | 428 | ||
420 | static inline unsigned default_get_apic_id(unsigned long x) | 429 | static inline unsigned default_get_apic_id(unsigned long x) |