svn commit: r214448 - in head/sys: amd64/amd64 i386/i386

John Baldwin jhb at FreeBSD.org
Thu Oct 28 13:44:19 UTC 2010


Author: jhb
Date: Thu Oct 28 13:44:19 2010
New Revision: 214448
URL: http://svn.freebsd.org/changeset/base/214448

Log:
  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.
  
  PR:		bin/151616
  Tested by:	"Damian S. Kolodziejczyk"  damkol | gmail
  Submitted by:	avg
  MFC after:	1 week

Modified:
  head/sys/amd64/amd64/intr_machdep.c
  head/sys/i386/i386/intr_machdep.c

Modified: head/sys/amd64/amd64/intr_machdep.c
==============================================================================
--- head/sys/amd64/amd64/intr_machdep.c	Thu Oct 28 11:09:12 2010	(r214447)
+++ head/sys/amd64/amd64/intr_machdep.c	Thu Oct 28 13:44:19 2010	(r214448)
@@ -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: head/sys/i386/i386/intr_machdep.c
==============================================================================
--- head/sys/i386/i386/intr_machdep.c	Thu Oct 28 11:09:12 2010	(r214447)
+++ head/sys/i386/i386/intr_machdep.c	Thu Oct 28 13:44:19 2010	(r214448)
@@ -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-head mailing list