diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/mpparse_32.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c index 22fc8d7dec11..bfcfc41f5607 100644 --- a/arch/x86/kernel/mpparse_32.c +++ b/arch/x86/kernel/mpparse_32.c | |||
@@ -1041,13 +1041,14 @@ void __init mp_config_acpi_legacy_irqs (void) | |||
1041 | } | 1041 | } |
1042 | 1042 | ||
1043 | #define MAX_GSI_NUM 4096 | 1043 | #define MAX_GSI_NUM 4096 |
1044 | #define IRQ_COMPRESSION_START 64 | ||
1044 | 1045 | ||
1045 | int mp_register_gsi(u32 gsi, int triggering, int polarity) | 1046 | int mp_register_gsi(u32 gsi, int triggering, int polarity) |
1046 | { | 1047 | { |
1047 | int ioapic = -1; | 1048 | int ioapic = -1; |
1048 | int ioapic_pin = 0; | 1049 | int ioapic_pin = 0; |
1049 | int idx, bit = 0; | 1050 | int idx, bit = 0; |
1050 | static int pci_irq = 16; | 1051 | static int pci_irq = IRQ_COMPRESSION_START; |
1051 | /* | 1052 | /* |
1052 | * Mapping between Global System Interrups, which | 1053 | * Mapping between Global System Interrups, which |
1053 | * represent all possible interrupts, and IRQs | 1054 | * represent all possible interrupts, and IRQs |
@@ -1086,12 +1087,16 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity) | |||
1086 | if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) { | 1087 | if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) { |
1087 | Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n", | 1088 | Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n", |
1088 | mp_ioapic_routing[ioapic].apic_id, ioapic_pin); | 1089 | mp_ioapic_routing[ioapic].apic_id, ioapic_pin); |
1089 | return gsi_to_irq[gsi]; | 1090 | return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]); |
1090 | } | 1091 | } |
1091 | 1092 | ||
1092 | mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); | 1093 | mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); |
1093 | 1094 | ||
1094 | if (triggering == ACPI_LEVEL_SENSITIVE) { | 1095 | /* |
1096 | * For GSI >= 64, use IRQ compression | ||
1097 | */ | ||
1098 | if ((gsi >= IRQ_COMPRESSION_START) | ||
1099 | && (triggering == ACPI_LEVEL_SENSITIVE)) { | ||
1095 | /* | 1100 | /* |
1096 | * For PCI devices assign IRQs in order, avoiding gaps | 1101 | * For PCI devices assign IRQs in order, avoiding gaps |
1097 | * due to unused I/O APIC pins. | 1102 | * due to unused I/O APIC pins. |