svn commit: r323450 - head/sys/x86/x86

Konstantin Belousov kib at FreeBSD.org
Mon Sep 11 18:29:10 UTC 2017


Author: kib
Date: Mon Sep 11 18:29:09 2017
New Revision: 323450
URL: https://svnweb.freebsd.org/changeset/base/323450

Log:
  Fix ioapic acpi id matching on PCI attach and rid calculation.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	11 days

Modified:
  head/sys/x86/x86/io_apic.c

Modified: head/sys/x86/x86/io_apic.c
==============================================================================
--- head/sys/x86/x86/io_apic.c	Mon Sep 11 18:11:53 2017	(r323449)
+++ head/sys/x86/x86/io_apic.c	Mon Sep 11 18:29:09 2017	(r323450)
@@ -997,7 +997,7 @@ ioapic_pci_attach(device_t dev)
 	}
 	/* Then by apic id */
 	STAILQ_FOREACH(io, &ioapic_list, io_next) {
-		if (io->io_id == apic_id)
+		if (io->io_apic_id == apic_id)
 			goto found;
 	}
 	mtx_unlock_spin(&icu_lock);
@@ -1017,13 +1017,13 @@ found:
 	io->pci_dev = dev;
 	io->pci_wnd = res;
 	if (bootverbose && (io->io_paddr != (vm_paddr_t)rman_get_start(res) ||
-	    io->io_id != apic_id)) {
+	    io->io_apic_id != apic_id)) {
 		device_printf(dev, "pci%d:%d:%d:%d pci BAR0@%jx id %d "
 		    "MADT id %d paddr@%jx\n",
 		    pci_get_domain(dev), pci_get_bus(dev),
 		    pci_get_slot(dev), pci_get_function(dev),
 		    (uintmax_t)rman_get_start(res), apic_id,
-		    io->io_id, (uintmax_t)io->io_paddr);
+		    io->io_apic_id, (uintmax_t)io->io_paddr);
 	}
 	mtx_unlock_spin(&icu_lock);
 	return (0);
@@ -1051,7 +1051,7 @@ ioapic_get_rid(u_int apic_id, uint16_t *ridp)
 
 	mtx_lock_spin(&icu_lock);
 	STAILQ_FOREACH(io, &ioapic_list, io_next) {
-		if (io->io_id == apic_id)
+		if (io->io_apic_id == apic_id)
 			break;
 	}
 	mtx_unlock_spin(&icu_lock);


More information about the svn-src-head mailing list