Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191513
b: refs/heads/master
c: 9a0a91b
h: refs/heads/master
i:
  191511: 3a1d902
v: v3
  • Loading branch information
Eric W. Biederman authored and H. Peter Anvin committed May 4, 2010
1 parent 3f0aa81 commit 74e428a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 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: 2c2df8418ac7908eec4558407b83f16739006c54
refs/heads/master: 9a0a91bb56d2915cdb8585717de38376ad20fef9
23 changes: 14 additions & 9 deletions trunk/arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -4082,22 +4082,27 @@ int __init io_apic_get_version(int ioapic)
return reg_01.bits.version;
}

int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity)
int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity)
{
int i;
int ioapic, pin, idx;

if (skip_ioapic_setup)
return -1;

for (i = 0; i < mp_irq_entries; i++)
if (mp_irqs[i].irqtype == mp_INT &&
mp_irqs[i].srcbusirq == bus_irq)
break;
if (i >= mp_irq_entries)
ioapic = mp_find_ioapic(gsi);
if (ioapic < 0)
return -1;

pin = mp_find_ioapic_pin(ioapic, gsi);
if (pin < 0)
return -1;

idx = find_irq_entry(ioapic, pin, mp_INT);
if (idx < 0)
return -1;

*trigger = irq_trigger(i);
*polarity = irq_polarity(i);
*trigger = irq_trigger(idx);
*polarity = irq_polarity(idx);
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
int acpi_isa_irq_to_gsi (unsigned isa_irq, u32 *gsi);

#ifdef CONFIG_X86_IO_APIC
extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity);
extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity);
#else
#define acpi_get_override_irq(bus, trigger, polarity) (-1)
#define acpi_get_override_irq(gsi, trigger, polarity) (-1)
#endif
/*
* This function undoes the effect of one call to acpi_register_gsi().
Expand Down

0 comments on commit 74e428a

Please sign in to comment.