svn commit: r320489 - head/sys/powerpc/booke
Justin Hibbits
jhibbits at FreeBSD.org
Fri Jun 30 02:11:33 UTC 2017
Author: jhibbits
Date: Fri Jun 30 02:11:32 2017
New Revision: 320489
URL: https://svnweb.freebsd.org/changeset/base/320489
Log:
Use the more common Book-E idiom for disabling interrupts.
Book-E has the wrteei/wrtee instructions for writing the PSL_EE bit, ignoring
all others. Use this instead of the AIM-typical mtmsr.
MFC with: r320392
Modified:
head/sys/powerpc/booke/pmap.c
Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c Fri Jun 30 00:20:48 2017 (r320488)
+++ head/sys/powerpc/booke/pmap.c Fri Jun 30 02:11:32 2017 (r320489)
@@ -3818,7 +3818,7 @@ tlb1_read_entry(tlb_entry_t *entry, unsigned int slot)
KASSERT((entry != NULL), ("%s(): Entry is NULL!", __func__));
msr = mfmsr();
- mtmsr(msr & ~PSL_EE);
+ __asm __volatile("wrteei 0");
mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(slot);
mtspr(SPR_MAS0, mas0);
@@ -3865,7 +3865,7 @@ tlb1_write_entry(tlb_entry_t *e, unsigned int idx)
//debugf("tlb1_write_entry: mas0 = 0x%08x\n", mas0);
msr = mfmsr();
- mtmsr(msr & ~PSL_EE);
+ __asm __volatile("wrteei 0");
mtspr(SPR_MAS0, mas0);
__asm __volatile("isync");
More information about the svn-src-head
mailing list