[PATCH 1/2] sh: stub out pud_page

From: Christoph Hellwig
Date: Mon Jul 01 2019 - 11:19:04 EST


There wasn't any actual need to add a real pud_page, as pud_huge
always returns false on sh. Just stub it out to fix the sh3
compile failure.

Fixes: 937b4e1d6471 ("sh: add the missing pud_page definition")
Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
arch/sh/include/asm/pgtable-3level.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/sh/include/asm/pgtable-3level.h b/arch/sh/include/asm/pgtable-3level.h
index 3c7ff20f3f94..779260b721ca 100644
--- a/arch/sh/include/asm/pgtable-3level.h
+++ b/arch/sh/include/asm/pgtable-3level.h
@@ -37,7 +37,9 @@ static inline unsigned long pud_page_vaddr(pud_t pud)
{
return pud_val(pud);
}
-#define pud_page(pud) pfn_to_page(pud_pfn(pud))
+
+/* only used by the stubbed out hugetlb gup code, should never be called */
+#define pud_page(pud) NULL

#define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1))
static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
--
2.20.1