Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79918
b: refs/heads/master
c: 2ba7dee
h: refs/heads/master
v: v3
  • Loading branch information
Len Brown authored and Ingo Molnar committed Jan 30, 2008
1 parent a7d4c1f commit a35639e
Show file tree
Hide file tree
Showing 2 changed files with 9 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: faca62273b602ab482fb7d3d940dbf41ef08b00e
refs/heads/master: 2ba7deef09dad6662dc4fa8b275af8d0794fd9fc
11 changes: 8 additions & 3 deletions trunk/arch/x86/kernel/mpparse_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,13 +1041,14 @@ void __init mp_config_acpi_legacy_irqs (void)
}

#define MAX_GSI_NUM 4096
#define IRQ_COMPRESSION_START 64

int mp_register_gsi(u32 gsi, int triggering, int polarity)
{
int ioapic = -1;
int ioapic_pin = 0;
int idx, bit = 0;
static int pci_irq = 16;
static int pci_irq = IRQ_COMPRESSION_START;
/*
* Mapping between Global System Interrups, which
* represent all possible interrupts, and IRQs
Expand Down Expand Up @@ -1086,12 +1087,16 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
return gsi_to_irq[gsi];
return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]);
}

mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);

if (triggering == ACPI_LEVEL_SENSITIVE) {
/*
* For GSI >= 64, use IRQ compression
*/
if ((gsi >= IRQ_COMPRESSION_START)
&& (triggering == ACPI_LEVEL_SENSITIVE)) {
/*
* For PCI devices assign IRQs in order, avoiding gaps
* due to unused I/O APIC pins.
Expand Down

0 comments on commit a35639e

Please sign in to comment.