projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
MIPS: Ensure pmd_present() returns false after pmd_mknotpresent()
[platform/kernel/linux-starfive.git]
/
arch
/
mips
/
include
/
asm
/
pgtable-64.h
diff --git
a/arch/mips/include/asm/pgtable-64.h
b/arch/mips/include/asm/pgtable-64.h
index
0036ea0
..
93a9dce
100644
(file)
--- a/
arch/mips/include/asm/pgtable-64.h
+++ b/
arch/mips/include/asm/pgtable-64.h
@@
-265,6
+265,11
@@
static inline int pmd_bad(pmd_t pmd)
static inline int pmd_present(pmd_t pmd)
{
+#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
+ if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
+ return pmd_val(pmd) & _PAGE_PRESENT;
+#endif
+
return pmd_val(pmd) != (unsigned long) invalid_pte_table;
}