Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136727
b: refs/heads/master
c: c3e137d
h: refs/heads/master
i:
  136725: 92434ff
  136723: 92d40f3
  136719: 237bb0b
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed Feb 9, 2009
1 parent e4b265d commit 5c7fe86
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 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: 4924e228ae039029a9503ad571d91086e4042c90
refs/heads/master: c3e137d1e882c4fab9adcce7ae2be9bf3eb64c4c
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/mpspec.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ extern int acpi_probe_gsi(void);
extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
u32 gsi, int triggering, int polarity);
extern int mp_find_ioapic(int gsi);
extern int mp_find_ioapic_pin(int ioapic, int gsi);
#else
static inline int
mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
Expand Down
16 changes: 13 additions & 3 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,16 @@ int mp_find_ioapic(int gsi)
return -1;
}

int mp_find_ioapic_pin(int ioapic, int gsi)
{
if (WARN_ON(ioapic == -1))
return -1;
if (WARN_ON(gsi > mp_ioapic_routing[ioapic].gsi_end))
return -1;

return gsi - mp_ioapic_routing[ioapic].gsi_base;
}

static u8 __init uniq_ioapic_id(u8 id)
{
#ifdef CONFIG_X86_32
Expand Down Expand Up @@ -1022,7 +1032,7 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
ioapic = mp_find_ioapic(gsi);
if (ioapic < 0)
return;
pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
pin = mp_find_ioapic_pin(ioapic, gsi);

/*
* TBD: This check is for faulty timer entries, where the override
Expand Down Expand Up @@ -1142,7 +1152,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
return gsi;
}

ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
ioapic_pin = mp_find_ioapic_pin(ioapic, gsi);

#ifdef CONFIG_X86_32
if (ioapic_renumber_irq)
Expand Down Expand Up @@ -1231,7 +1241,7 @@ int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
mp_irq.srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3);
ioapic = mp_find_ioapic(gsi);
mp_irq.dstapic = mp_ioapic_routing[ioapic].apic_id;
mp_irq.dstirq = gsi - mp_ioapic_routing[ioapic].gsi_base;
mp_irq.dstirq = mp_find_ioapic_pin(ioapic, gsi);

save_mp_irq(&mp_irq);
#endif
Expand Down

0 comments on commit 5c7fe86

Please sign in to comment.