[PATCH v3 12/34] nds32: mm: Add p?d_large() definitions

From: Steven Price
Date: Wed Feb 27 2019 - 12:07:18 EST


walk_page_range() is going to be allowed to walk page tables other than
those of user space. For this it needs to know when it has reached a
'leaf' entry in the page tables. This information is provided by the
p?d_large() functions/macros.

For nds32, we don't support large pages, so add stubs returning 0.

CC: Greentime Hu <green.hu@xxxxxxxxx>
CC: Vincent Chen <deanbo422@xxxxxxxxx>
Signed-off-by: Steven Price <steven.price@xxxxxxx>
---
arch/nds32/include/asm/pgtable.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/nds32/include/asm/pgtable.h b/arch/nds32/include/asm/pgtable.h
index 9f52db930c00..202ac93c0a6b 100644
--- a/arch/nds32/include/asm/pgtable.h
+++ b/arch/nds32/include/asm/pgtable.h
@@ -309,6 +309,7 @@ static inline pte_t pte_mkspecial(pte_t pte)

#define pmd_none(pmd) (pmd_val(pmd)&0x1)
#define pmd_present(pmd) (!pmd_none(pmd))
+#define pmd_large(pmd) (0)
#define pmd_bad(pmd) pmd_none(pmd)

#define copy_pmd(pmdpd,pmdps) set_pmd((pmdpd), *(pmdps))
@@ -349,6 +350,7 @@ static inline pmd_t __mk_pmd(pte_t * ptep, unsigned long prot)
#define pgd_none(pgd) (0)
#define pgd_bad(pgd) (0)
#define pgd_present(pgd) (1)
+#define pgd_large(pgd) (0)
#define pgd_clear(pgdp) do { } while (0)

#define page_pte_prot(page,prot) mk_pte(page, prot)
--
2.20.1