[1/2] sh: stub out pud_page
diff mbox series

Message ID 20190701151818.32227-2-hch@lst.de
State New
Headers show
Series
  • [1/2] sh: stub out pud_page
Related show

Commit Message

Christoph Hellwig July 1, 2019, 3:18 p.m. UTC
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@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/sh/include/asm/pgtable-3level.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Guenter Roeck July 1, 2019, 5:43 p.m. UTC | #1
On Mon, Jul 01, 2019 at 05:18:17PM +0200, Christoph Hellwig wrote:
> 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@roeck-us.net>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Tested-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  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
>

Patch
diff mbox series

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)