Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116440
b: refs/heads/master
c: 8ea5371
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Oct 16, 2008
1 parent 654beb9 commit d1e665a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 35 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: 1d02519242c23450b043e5e8a9e3cb84a8666fe3
refs/heads/master: 8ea5371baa82db452a8d93e9977b418d30944e32
67 changes: 33 additions & 34 deletions trunk/arch/x86/kernel/io_apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,40 +409,6 @@ static bool io_apic_level_ack_pending(unsigned int irq)
return false;
}

/*
* Synchronize the IO-APIC and the CPU by doing
* a dummy read from the IO-APIC
*/
static inline void io_apic_sync(unsigned int apic)
{
struct io_apic __iomem *io_apic = io_apic_base(apic);
readl(&io_apic->data);
}

#define __DO_ACTION(R, ACTION, FINAL) \
\
{ \
int pin; \
struct irq_cfg *cfg; \
struct irq_pin_list *entry; \
\
cfg = irq_cfg(irq); \
entry = cfg->irq_2_pin; \
for (;;) { \
unsigned int reg; \
if (!entry) \
break; \
pin = entry->pin; \
reg = io_apic_read(entry->apic, 0x10 + R + pin*2); \
reg ACTION; \
io_apic_modify(entry->apic, reg); \
FINAL; \
if (!entry->next) \
break; \
entry = entry->next; \
} \
}

union entry_union {
struct { u32 w1, w2; };
struct IO_APIC_route_entry entry;
Expand Down Expand Up @@ -627,6 +593,39 @@ static void __init replace_pin_at_irq(unsigned int irq,
add_pin_to_irq(irq, newapic, newpin);
}

/*
* Synchronize the IO-APIC and the CPU by doing
* a dummy read from the IO-APIC
*/
static inline void io_apic_sync(unsigned int apic)
{
struct io_apic __iomem *io_apic = io_apic_base(apic);
readl(&io_apic->data);
}

#define __DO_ACTION(R, ACTION, FINAL) \
\
{ \
int pin; \
struct irq_cfg *cfg; \
struct irq_pin_list *entry; \
\
cfg = irq_cfg(irq); \
entry = cfg->irq_2_pin; \
for (;;) { \
unsigned int reg; \
if (!entry) \
break; \
pin = entry->pin; \
reg = io_apic_read(entry->apic, 0x10 + R + pin*2); \
reg ACTION; \
io_apic_modify(entry->apic, reg); \
FINAL; \
if (!entry->next) \
break; \
entry = entry->next; \
} \
}

#define DO_ACTION(name,R,ACTION, FINAL) \
\
Expand Down

0 comments on commit d1e665a

Please sign in to comment.