svn commit: r224352 - in stable/8/sys/sparc64: include sparc64
Marius Strobl
marius at FreeBSD.org
Mon Jul 25 17:54:05 UTC 2011
Author: marius
Date: Mon Jul 25 17:54:04 2011
New Revision: 224352
URL: http://svn.freebsd.org/changeset/base/224352
Log:
MFC: r222828 (partial)
- Test KTR_CPUMASK against pc_cpuid rather than pc_mid to match what the C
version does.
- Initialize global registers early in the MP startup code so PCPU can be
used.
Modified:
stable/8/sys/sparc64/include/ktr.h
stable/8/sys/sparc64/sparc64/mp_locore.S
stable/8/sys/sparc64/sparc64/mp_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/geom/label/ (props changed)
Modified: stable/8/sys/sparc64/include/ktr.h
==============================================================================
--- stable/8/sys/sparc64/include/ktr.h Mon Jul 25 17:37:54 2011 (r224351)
+++ stable/8/sys/sparc64/include/ktr.h Mon Jul 25 17:54:04 2011 (r224352)
@@ -82,7 +82,7 @@ l2: add r2, 1, r3 ; \
#define CATR(mask, desc, r1, r2, r3, l1, l2, l3) \
set mask, r1 ; \
TEST(ktr_mask, r1, r2, r2, l3) ; \
- lduw [PCPU(MID)], r1 ; \
+ lduw [PCPU(CPUID)], r1 ; \
mov 1, r2 ; \
sllx r2, r1, r1 ; \
TEST(ktr_cpumask, r1, r2, r3, l3) ; \
Modified: stable/8/sys/sparc64/sparc64/mp_locore.S
==============================================================================
--- stable/8/sys/sparc64/sparc64/mp_locore.S Mon Jul 25 17:37:54 2011 (r224351)
+++ stable/8/sys/sparc64/sparc64/mp_locore.S Mon Jul 25 17:54:04 2011 (r224352)
@@ -269,13 +269,17 @@ ENTRY(mp_startup)
add %l1, %l2, %l1
sub %l1, SPOFF + CCFSZ, %sp
+ /* Initialize global registers. */
+ call cpu_setregs
+ mov %l1, %o0
+
#if KTR_COMPILE & KTR_SMP
CATR(KTR_SMP,
"mp_startup: bootstrap cpuid=%d mid=%d pcpu=%#lx data=%#lx sp=%#lx"
, %g1, %g2, %g3, 7, 8, 9)
- lduw [%l1 + PC_CPUID], %g2
+ lduw [PCPU(CPUID)], %g2
stx %g2, [%g1 + KTR_PARM1]
- lduw [%l1 + PC_MID], %g2
+ lduw [PCPU(MID)], %g2
stx %g2, [%g1 + KTR_PARM2]
stx %l1, [%g1 + KTR_PARM3]
stx %sp, [%g1 + KTR_PARM5]
Modified: stable/8/sys/sparc64/sparc64/mp_machdep.c
==============================================================================
--- stable/8/sys/sparc64/sparc64/mp_machdep.c Mon Jul 25 17:37:54 2011 (r224351)
+++ stable/8/sys/sparc64/sparc64/mp_machdep.c Mon Jul 25 17:54:04 2011 (r224352)
@@ -451,9 +451,6 @@ cpu_mp_bootstrap(struct pcpu *pc)
*/
tlb_flush_nonlocked();
- /* Initialize global registers. */
- cpu_setregs(pc);
-
/*
* Enable interrupts.
* Note that the PIL we be lowered indirectly via sched_throw(NULL)
More information about the svn-src-all
mailing list