Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191117
b: refs/heads/master
c: d674cd1
h: refs/heads/master
i:
  191115: ccdf481
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Mar 18, 2010
1 parent f5b761e commit b23e78b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6d901c23a9c4c7361aa901b5b2dda69703dd5e0
refs/heads/master: d674cd1963129b70bc5f631c51fb30fb73213fb2
13 changes: 11 additions & 2 deletions trunk/arch/x86/include/asm/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ extern atomic_t init_deasserted;
extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
#endif

#ifdef CONFIG_X86_LOCAL_APIC
static inline u32 apic_read(u32 reg)
{
return apic->read(reg);
Expand Down Expand Up @@ -403,18 +404,26 @@ static inline u32 safe_apic_wait_icr_idle(void)
return apic->safe_wait_icr_idle();
}

#else /* CONFIG_X86_LOCAL_APIC */

static inline u32 apic_read(u32 reg) { return 0; }
static inline void apic_write(u32 reg, u32 val) { }
static inline u64 apic_icr_read(void) { return 0; }
static inline void apic_icr_write(u32 low, u32 high) { }
static inline void apic_wait_icr_idle(void) { }
static inline u32 safe_apic_wait_icr_idle(void) { return 0; }

#endif /* CONFIG_X86_LOCAL_APIC */

static inline void ack_APIC_irq(void)
{
#ifdef CONFIG_X86_LOCAL_APIC
/*
* ack_APIC_irq() actually gets compiled as a single instruction
* ... yummie.
*/

/* Docs say use 0 for future compatibility */
apic_write(APIC_EOI, 0);
#endif
}

static inline unsigned default_get_apic_id(unsigned long x)
Expand Down

0 comments on commit b23e78b

Please sign in to comment.