svn commit: r214788 - in stable/8/sys: amd64/amd64 i386/i386

John Baldwin jhb at FreeBSD.org
Thu Nov 4 17:19:16 UTC 2010


Author: jhb
Date: Thu Nov  4 17:19:16 2010
New Revision: 214788
URL: http://svn.freebsd.org/changeset/base/214788

Log:
  MFC 214448:
  Use 'PCPU_GET(apic_id)' to determine the BSP's APIC ID on a UP machine
  when routing interrupts instead of cpu_apic_ids[0] since cpu_apic_ids[]
  is only populated for multiple-CPU machines.  This also matches what the
  code does when SMP is not enabled.

Modified:
  stable/8/sys/amd64/amd64/intr_machdep.c
  stable/8/sys/i386/i386/intr_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/amd64/intr_machdep.c
==============================================================================
--- stable/8/sys/amd64/amd64/intr_machdep.c	Thu Nov  4 17:13:30 2010	(r214787)
+++ stable/8/sys/amd64/amd64/intr_machdep.c	Thu Nov  4 17:19:16 2010	(r214788)
@@ -458,7 +458,7 @@ intr_next_cpu(void)
 
 	/* Leave all interrupts on the BSP during boot. */
 	if (!assign_cpu)
-		return (cpu_apic_ids[0]);
+		return (PCPU_GET(apic_id));
 
 	mtx_lock_spin(&icu_lock);
 	apic_id = cpu_apic_ids[current_cpu];

Modified: stable/8/sys/i386/i386/intr_machdep.c
==============================================================================
--- stable/8/sys/i386/i386/intr_machdep.c	Thu Nov  4 17:13:30 2010	(r214787)
+++ stable/8/sys/i386/i386/intr_machdep.c	Thu Nov  4 17:19:16 2010	(r214788)
@@ -424,7 +424,7 @@ intr_next_cpu(void)
 
 	/* Leave all interrupts on the BSP during boot. */
 	if (!assign_cpu)
-		return (cpu_apic_ids[0]);
+		return (PCPU_GET(apic_id));
 
 	mtx_lock_spin(&icu_lock);
 	apic_id = cpu_apic_ids[current_cpu];


More information about the svn-src-stable-8 mailing list