hugetlb: fix ARM 3level page tables
PATCH 1/1 hugetlb: fix ARM 3level page tables
The check for __HAVE_ARCH_HUGE_PTEP_GET comes before the definition, leading to an extraneous definition of huge_ptep_get:
In file included from arch/arm/include/asm/hugetlb.h:28,
from include/linux/hugetlb.h:456,
from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:22:arch/arm/include/asm/hugetlb-3level.h:33:21: error: redefinition of 'huge_ptep_get'
static inline pte_t huge_ptep_get(pte_t *ptep)
Change the header file inclusions to be in the correct order for this to work.
--- arch/arm/include/asm/hugetlb.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/include/asm/hugetlb.h +1 -2
@@ -23,9 +23,8 @@#define _ASM_ARM_HUGETLB_H#include <asm/page.h> -#include <asm-generic/hugetlb.h> -#include <asm/hugetlb-3level.h> +#include <asm-generic/hugetlb.h> static inline int is_hugepage_only_range (struct mm_struct *mm,unsigned long addr,unsigned long len)
Signature · 1 line
2.18.0
Arnd,
Quoted 7 lines · Arnd Bergmann
The check for
__HAVE_ARCH_HUGE_PTEP_GETcomes before the definition, leading to an extraneous definition ofhuge_ptep_get:In file included from
arch/arm/include/asm/hugetlb.h:28,from include/linux/hugetlb.h:456, from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:22:
Quoted 8 lines
arch/arm/include/asm/hugetlb-3level.h:33:21: error: redefinition of 'huge_ptep_get'
static inlinepte_thuge_ptep_get(pte_t *ptep)Change the header file inclusions to be in the correct order for this to work.
Fixes bb1d18ffc7ae ("hugetlb: introduce generic version of huge_ptep_get")Signed-off-by Arnd Bergmann <[email protected]>
I have noticed this build error on linux next tree for arm32 build. Thanks for the fix.
- Naresh
Thanks Arnd, this change intervened in v5, that seemed straightforward enough...Sorry about that, and thanks for your fix.
Alex
Quoted 33 lines · Arnd Bergmann
The check for
__HAVE_ARCH_HUGE_PTEP_GETcomes before the definition, leading to an extraneous definition ofhuge_ptep_get:In file included from
arch/arm/include/asm/hugetlb.h:28,from include/linux/hugetlb.h:456, from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:22:
arch/arm/include/asm/hugetlb-3level.h:33:21: error: redefinition of 'huge_ptep_get'
static inlinepte_thuge_ptep_get(pte_t *ptep)Change the header file inclusions to be in the correct order for this to work.
Fixes bb1d18ffc7ae ("hugetlb: introduce generic version of huge_ptep_get")Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm/include/asm/hugetlb.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/arm/include/asm/hugetlb.h +1
-2@@ -23,9 +23,8 @@#define _ASM_ARM_HUGETLB_H#include <asm/page.h> -#include <asm-generic/hugetlb.h> -#include <asm/hugetlb-3level.h> +#include <asm-generic/hugetlb.h> static inline int is_hugepage_only_range (struct mm_struct *mm,unsigned long addr,unsigned long len)