Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

legacy interrupts on pci interrupt establish path.


I'd like to propose the following diff:

diff -r e8efcad62fc7 -r deb181d94ab1 sys/arch/x86/pci/pci_intr_machdep.c
--- a/sys/arch/x86/pci/pci_intr_machdep.c	Wed Aug 22 14:12:30 2018 +0000
+++ b/sys/arch/x86/pci/pci_intr_machdep.c	Wed Aug 29 07:40:56 2018 +0000
@@ -294,9 +294,7 @@
 			return ENOENT;
 		*pic = &ioapic->sc_pic;
 		*pin = APIC_IRQ_PIN(ih);
-		*irq = APIC_IRQ_LEGACY_IRQ(ih);
-		if (*irq < 0 || *irq >= NUM_LEGACY_IRQS)
-			*irq = -1;
+		*irq = -1; /* PCI doesn't use legacy irq */
afaiu, legacy irq is only relevant to the isa_interrupt_establish..()
path or when IOAPIC support is disabled in the kernel. 

With PCI and -D NIOAPIC support, the {ioapic, pin} tuple are
reprogrammed onto specific lapic vectors and any boot time/ BIOS
legacy irq mappings are thus overridden.

I'm open to revising my understanding of this.

Patches have been tested on native by gson@


This will also help with a separate unifying XEN related patch.

Please let me know if you have any objections to committing this.


Home | Main Index | Thread Index | Old Index