svn commit: r222564 - projects/pseries/powerpc/aim
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Wed Jun 1 14:17:17 UTC 2011
Author: nwhitehorn
Date: Wed Jun 1 14:17:16 2011
New Revision: 222564
URL: http://svn.freebsd.org/changeset/base/222564
Log:
Regularize MSR setting by removing spurious isync()s (mtmsr() does an isync
already) and by explicitly setting the first thread's MSR to PSL_KERNSET
instead of a modification of Open Firmware's MSR.
Modified:
projects/pseries/powerpc/aim/interrupt.c
projects/pseries/powerpc/aim/machdep.c
projects/pseries/powerpc/aim/mmu_oea64.c
projects/pseries/powerpc/aim/moea64_native.c
projects/pseries/powerpc/aim/mp_cpudep.c
Modified: projects/pseries/powerpc/aim/interrupt.c
==============================================================================
--- projects/pseries/powerpc/aim/interrupt.c Wed Jun 1 14:12:35 2011 (r222563)
+++ projects/pseries/powerpc/aim/interrupt.c Wed Jun 1 14:17:16 2011 (r222564)
@@ -100,10 +100,8 @@ powerpc_interrupt(struct trapframe *fram
default:
/* Re-enable interrupts if applicable. */
ee = framep->srr1 & PSL_EE;
- if (ee != 0) {
+ if (ee != 0)
mtmsr(mfmsr() | ee);
- isync();
- }
trap(framep);
}
}
Modified: projects/pseries/powerpc/aim/machdep.c
==============================================================================
--- projects/pseries/powerpc/aim/machdep.c Wed Jun 1 14:12:35 2011 (r222563)
+++ projects/pseries/powerpc/aim/machdep.c Wed Jun 1 14:17:16 2011 (r222564)
@@ -374,7 +374,6 @@ powerpc_init(vm_offset_t startkernel, vm
msr = mfmsr();
mtmsr((msr & ~(PSL_IR | PSL_DR)) | PSL_RI);
- isync();
/*
* Measure the cacheline size using dcbz
@@ -509,7 +508,6 @@ powerpc_init(vm_offset_t startkernel, vm
* Restore MSR
*/
mtmsr(msr);
- isync();
/* Warn if cachline size was not determined */
if (cacheline_warn == 1) {
@@ -533,8 +531,7 @@ powerpc_init(vm_offset_t startkernel, vm
pmap_mmu_install(MMU_TYPE_OEA, BUS_PROBE_GENERIC);
pmap_bootstrap(startkernel, endkernel);
- mtmsr(mfmsr() | PSL_IR|PSL_DR|PSL_ME|PSL_RI);
- isync();
+ mtmsr(PSL_KERNSET & ~PSL_EE);
/*
* Initialize params/tunables that are derived from memsize
Modified: projects/pseries/powerpc/aim/mmu_oea64.c
==============================================================================
--- projects/pseries/powerpc/aim/mmu_oea64.c Wed Jun 1 14:12:35 2011 (r222563)
+++ projects/pseries/powerpc/aim/mmu_oea64.c Wed Jun 1 14:17:16 2011 (r222564)
@@ -162,8 +162,8 @@ __FBSDID("$FreeBSD$");
void moea64_release_vsid(uint64_t vsid);
uintptr_t moea64_get_unique_vsid(void);
-#define DISABLE_TRANS(msr) msr = mfmsr(); mtmsr(msr & ~PSL_DR); isync()
-#define ENABLE_TRANS(msr) mtmsr(msr); isync()
+#define DISABLE_TRANS(msr) msr = mfmsr(); mtmsr(msr & ~PSL_DR)
+#define ENABLE_TRANS(msr) mtmsr(msr)
#define VSID_MAKE(sr, hash) ((sr) | (((hash) & 0xfffff) << 4))
#define VSID_TO_HASH(vsid) (((vsid) >> 4) & 0xfffff)
@@ -877,7 +877,7 @@ moea64_late_bootstrap(mmu_t mmup, vm_off
* Initialize MMU and remap early physical mappings
*/
MMU_CPU_BOOTSTRAP(mmup,0);
- mtmsr(mfmsr() | PSL_DR | PSL_IR); isync();
+ mtmsr(mfmsr() | PSL_DR | PSL_IR);
pmap_bootstrapped++;
bs_remap_earlyboot();
Modified: projects/pseries/powerpc/aim/moea64_native.c
==============================================================================
--- projects/pseries/powerpc/aim/moea64_native.c Wed Jun 1 14:12:35 2011 (r222563)
+++ projects/pseries/powerpc/aim/moea64_native.c Wed Jun 1 14:17:16 2011 (r222564)
@@ -185,8 +185,8 @@ TLBIE(uint64_t vpn) {
mtx_unlock_spin(&tlbie_mutex);
}
-#define DISABLE_TRANS(msr) msr = mfmsr(); mtmsr(msr & ~PSL_DR); isync()
-#define ENABLE_TRANS(msr) mtmsr(msr); isync()
+#define DISABLE_TRANS(msr) msr = mfmsr(); mtmsr(msr & ~PSL_DR)
+#define ENABLE_TRANS(msr) mtmsr(msr)
/*
* PTEG data.
@@ -344,7 +344,7 @@ moea64_cpu_bootstrap_native(mmu_t mmup,
* Initialize segment registers and MMU
*/
- mtmsr(mfmsr() & ~PSL_DR & ~PSL_IR); isync();
+ mtmsr(mfmsr() & ~PSL_DR & ~PSL_IR);
/*
* Install kernel SLB entries
Modified: projects/pseries/powerpc/aim/mp_cpudep.c
==============================================================================
--- projects/pseries/powerpc/aim/mp_cpudep.c Wed Jun 1 14:12:35 2011 (r222563)
+++ projects/pseries/powerpc/aim/mp_cpudep.c Wed Jun 1 14:17:16 2011 (r222564)
@@ -87,7 +87,6 @@ cpudep_ap_bootstrap(void)
msr = PSL_KERNSET & ~PSL_EE;
mtmsr(msr);
- isync();
pcpup->pc_curthread = pcpup->pc_idlethread;
pcpup->pc_curpcb = pcpup->pc_curthread->td_pcb;
More information about the svn-src-projects
mailing list