Date: Tue, 16 Feb 2016 02:13:55 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295642 - in head/sys/powerpc: booke include Message-ID: <201602160213.u1G2DtHc010935@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602160213.u1G2DtHc010935>