linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n
@ 2017-02-14  2:14 Michael Ellerman
  2017-02-14  4:13 ` Aneesh Kumar K.V
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2017-02-14  2:14 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: aneesh.kumar, arbab

If we enable RADIX but disable HUGETLBFS, the build breaks with:

  arch/powerpc/mm/pgtable-radix.c:557:7: error: implicit declaration of function 'pmd_huge'
  arch/powerpc/mm/pgtable-radix.c:588:7: error: implicit declaration of function 'pud_huge'

Fix it by stubbing those functions when HUGETLBFS=n.

Fixes: 4b5d62ca17a1 ("powerpc/mm: add radix__remove_section_mapping()")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/include/asm/book3s/64/pgtable-4k.h  | 5 +++++
 arch/powerpc/include/asm/book3s/64/pgtable-64k.h | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/arch/powerpc/include/asm/book3s/64/pgtable-4k.h b/arch/powerpc/include/asm/book3s/64/pgtable-4k.h
index 9db83b4e017d..8708a0239a56 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable-4k.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable-4k.h
@@ -47,7 +47,12 @@ static inline int hugepd_ok(hugepd_t hpd)
 	return hash__hugepd_ok(hpd);
 }
 #define is_hugepd(hpd)		(hugepd_ok(hpd))
+
+#else /* !CONFIG_HUGETLB_PAGE */
+static inline int pmd_huge(pmd_t pmd) { return 0; }
+static inline int pud_huge(pud_t pud) { return 0; }
 #endif /* CONFIG_HUGETLB_PAGE */
+
 #endif /* __ASSEMBLY__ */
 
 #endif /*_ASM_POWERPC_BOOK3S_64_PGTABLE_4K_H */
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable-64k.h b/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
index 198aff33c380..2ce4209399ed 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
@@ -46,6 +46,9 @@ static inline int hugepd_ok(hugepd_t hpd)
 }
 #define is_hugepd(pdep)			0
 
+#else /* !CONFIG_HUGETLB_PAGE */
+static inline int pmd_huge(pmd_t pmd) { return 0; }
+static inline int pud_huge(pud_t pud) { return 0; }
 #endif /* CONFIG_HUGETLB_PAGE */
 
 static inline int remap_4k_pfn(struct vm_area_struct *vma, unsigned long addr,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n
  2017-02-14  2:14 [PATCH] powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n Michael Ellerman
@ 2017-02-14  4:13 ` Aneesh Kumar K.V
  0 siblings, 0 replies; 2+ messages in thread
From: Aneesh Kumar K.V @ 2017-02-14  4:13 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev; +Cc: arbab

Michael Ellerman <mpe@ellerman.id.au> writes:

> If we enable RADIX but disable HUGETLBFS, the build breaks with:
>
>   arch/powerpc/mm/pgtable-radix.c:557:7: error: implicit declaration of function 'pmd_huge'
>   arch/powerpc/mm/pgtable-radix.c:588:7: error: implicit declaration of function 'pud_huge'
>
> Fix it by stubbing those functions when HUGETLBFS=n.
>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>


> Fixes: 4b5d62ca17a1 ("powerpc/mm: add radix__remove_section_mapping()")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>  arch/powerpc/include/asm/book3s/64/pgtable-4k.h  | 5 +++++
>  arch/powerpc/include/asm/book3s/64/pgtable-64k.h | 3 +++
>  2 files changed, 8 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable-4k.h b/arch/powerpc/include/asm/book3s/64/pgtable-4k.h
> index 9db83b4e017d..8708a0239a56 100644
> --- a/arch/powerpc/include/asm/book3s/64/pgtable-4k.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable-4k.h
> @@ -47,7 +47,12 @@ static inline int hugepd_ok(hugepd_t hpd)
>  	return hash__hugepd_ok(hpd);
>  }
>  #define is_hugepd(hpd)		(hugepd_ok(hpd))
> +
> +#else /* !CONFIG_HUGETLB_PAGE */
> +static inline int pmd_huge(pmd_t pmd) { return 0; }
> +static inline int pud_huge(pud_t pud) { return 0; }
>  #endif /* CONFIG_HUGETLB_PAGE */
> +
>  #endif /* __ASSEMBLY__ */
>
>  #endif /*_ASM_POWERPC_BOOK3S_64_PGTABLE_4K_H */
> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable-64k.h b/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
> index 198aff33c380..2ce4209399ed 100644
> --- a/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable-64k.h
> @@ -46,6 +46,9 @@ static inline int hugepd_ok(hugepd_t hpd)
>  }
>  #define is_hugepd(pdep)			0
>
> +#else /* !CONFIG_HUGETLB_PAGE */
> +static inline int pmd_huge(pmd_t pmd) { return 0; }
> +static inline int pud_huge(pud_t pud) { return 0; }
>  #endif /* CONFIG_HUGETLB_PAGE */
>
>  static inline int remap_4k_pfn(struct vm_area_struct *vma, unsigned long addr,
> -- 
> 2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-14  4:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14  2:14 [PATCH] powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n Michael Ellerman
2017-02-14  4:13 ` Aneesh Kumar K.V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).