diff mbox series

MIPS: fix pmd_bad check for huge pmd

Message ID 1652176908-22288-1-git-send-email-zhanghongchen@loongson.cn (mailing list archive)
State New
Headers show
Series MIPS: fix pmd_bad check for huge pmd | expand

Commit Message

Hongchen Zhang May 10, 2022, 10:01 a.m. UTC
a huge pmd is also a bad pmd,so make pmd_bad return 1 when
passed in a huge pmd.

Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
---
 arch/mips/include/asm/pgtable-32.h | 6 ------
 arch/mips/include/asm/pgtable-64.h | 6 ------
 2 files changed, 12 deletions(-)
diff mbox series

Patch

diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h
index 95df9c2..252887b 100644
--- a/arch/mips/include/asm/pgtable-32.h
+++ b/arch/mips/include/asm/pgtable-32.h
@@ -129,12 +129,6 @@  static inline int pmd_none(pmd_t pmd)
 
 static inline int pmd_bad(pmd_t pmd)
 {
-#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
-	/* pmd_huge(pmd) but inline */
-	if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
-		return 0;
-#endif
-
 	if (unlikely(pmd_val(pmd) & ~PAGE_MASK))
 		return 1;
 
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h
index 41921ac..ef52812 100644
--- a/arch/mips/include/asm/pgtable-64.h
+++ b/arch/mips/include/asm/pgtable-64.h
@@ -249,12 +249,6 @@  static inline int pmd_none(pmd_t pmd)
 
 static inline int pmd_bad(pmd_t pmd)
 {
-#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
-	/* pmd_huge(pmd) but inline */
-	if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
-		return 0;
-#endif
-
 	if (unlikely(pmd_val(pmd) & ~PAGE_MASK))
 		return 1;