PERFORCE change 38539 for review

Peter Wemm peter at FreeBSD.org
Wed Sep 24 14:45:16 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=38539

Change 38539 by peter at peter_daintree on 2003/09/24 14:44:28

	Integrate -I from jhb_acpipci

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#3 integrate
.. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#5 integrate

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/local_apic.c#3 (text+ko) ====

@@ -187,6 +187,9 @@
 	value |= (APIC_SVR_FEN | APIC_SVR_SWEN | APIC_SPURIOUS_INT);
 	lapic->svr = value;
 
+	/* Set BSP's per-CPU local APIC ID. */
+	PCPU_SET(apic_id, lapic_id());
+
 	/* XXX: timer/error/thermal interrupts */
 }
 

==== //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#5 (text+ko) ====

@@ -279,8 +279,8 @@
 
 	mtx_init(&smp_tlb_mtx, "tlb", NULL, MTX_SPIN);
 
-	/* Setup BSP apic ID */
-	PCPU_SET(apic_id, lapic_id());
+	/* Set boot_cpu_id if needed. */
+	KASSERT(PCPU_GET(apic_id) == lapic_id(), ("APIC ID mismatch"));	/* XXXTEST */
 	if (boot_cpu_id == -1) {
 		boot_cpu_id = PCPU_GET(apic_id);
 		cpu_info[boot_cpu_id].cpu_bsp = 1;


More information about the p4-projects mailing list