From c7436ab2776897be6547e5802c3102676a2a64e2 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 22 Nov 2022 13:42:26 -0500 Subject: [PATCH 21/52] mips: Correct the definition of pde_is_1m_superpage() This function needs to look at the whole pagesize index mask. Harmless when there's only one large page size, but we are introducing some more. --- sys/mips/include/pte.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/mips/include/pte.h b/sys/mips/include/pte.h index 819e65010dee..d3780c8593f9 100644 --- a/sys/mips/include/pte.h +++ b/sys/mips/include/pte.h @@ -426,8 +426,7 @@ pte_is_superpage(pt_entry_t *pte) static __inline int pde_is_1m_superpage(pd_entry_t *pde) { - - return (((pt_entry_t)*pde & PTE_PS_1M) == PTE_PS_1M); + return (((pt_entry_t)*pde & PTE_PS_IDX_MASK) == PTE_PS_1M); } /* Is the PTE an 1MB superpage? */ -- 2.41.0