未验证 提交 141682f5 编写于 作者: N Nanyong Sun 提交者: Palmer Dabbelt

riscv: mm: make pmd_bad() check leaf condition

In the definition in Documentation/vm/arch_pgtable_helpers.rst,
pmd_bad() means test a non-table mapped PMD, so it should also
return true when it is a leaf page.
Signed-off-by: NNanyong Sun <sunnanyong@huawei.com>
Signed-off-by: NPalmer Dabbelt <palmerdabbelt@google.com>
上级 f5397c3e
......@@ -184,7 +184,7 @@ static inline int pmd_none(pmd_t pmd)
static inline int pmd_bad(pmd_t pmd)
{
return !pmd_present(pmd);
return !pmd_present(pmd) || (pmd_val(pmd) & _PAGE_LEAF);
}
#define pmd_leaf pmd_leaf
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册