svn commit: r295642 - in head/sys/powerpc: booke include
Justin Hibbits
jhibbits at FreeBSD.org
Tue Feb 16 02:13:57 UTC 2016
Author: jhibbits
Date: Tue Feb 16 02:13:55 2016
New Revision: 295642
URL: https://svnweb.freebsd.org/changeset/base/295642
Log:
Fix a panic bug that cropped up in the PTE rewrite.
PTE was getting overwritten by just the flags.
Pointy-hat to: jhibbits
Modified:
head/sys/powerpc/booke/pmap.c
head/sys/powerpc/include/pte.h
Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c Tue Feb 16 02:09:48 2016 (r295641)
+++ head/sys/powerpc/booke/pmap.c Tue Feb 16 02:13:55 2016 (r295642)
@@ -1759,7 +1759,8 @@ mmu_booke_enter_locked(mmu_t mmu, pmap_t
tlb_miss_lock();
tlb0_flush_entry(va);
- *pte = flags;
+ *pte &= ~PTE_FLAGS_MASK;
+ *pte |= flags;
tlb_miss_unlock();
mtx_unlock_spin(&tlbivax_mutex);
Modified: head/sys/powerpc/include/pte.h
==============================================================================
--- head/sys/powerpc/include/pte.h Tue Feb 16 02:09:48 2016 (r295641)
+++ head/sys/powerpc/include/pte.h Tue Feb 16 02:13:55 2016 (r295642)
@@ -270,6 +270,7 @@ typedef uint64_t pte_t;
/* Macro argument must of pte_t type. */
#define PTE_ARPN_SHIFT 12
+#define PTE_FLAGS_MASK 0x00ffffff
#define PTE_RPN_FROM_PA(pa) (((pa) & ~PAGE_MASK) << PTE_ARPN_SHIFT)
#define PTE_PA(pte) ((vm_paddr_t)(*pte >> PTE_ARPN_SHIFT) & ~PAGE_MASK)
#define PTE_ISVALID(pte) ((*pte) & PTE_VALID)
More information about the svn-src-all
mailing list