linux-next: build failure after merge of the mm tree
Hi all,
After merging the mm tree, today's linux-next build (sparc64 defconfig) failed like this:
In file included from include/linux/hugetlb.h:757,
from arch/sparc/mm/hugetlbpage.c:11:arch/sparc/include/asm/hugetlb.h: In function 'huge_ptep_clear_flush':arch/sparc/include/asm/hugetlb.h:27:1: error: no return statement in function returning non-void [-Werror=return-type]
27 | }
| ^
(and many more)
Caused by commit
083af99303b9 ("mm: change huge_ptep_clear_flush() to return the original pte")
I applied the following hack to make it build.
From: Stephen Rothwell <[email protected]>
Date: Wed, 11 May 2022 18:10:56 +1000
Subject: [PATCH] fix up for "mm: change huge_ptep_clear_flush() to return the original pte"
--- arch/sparc/include/asm/hugetlb.h | 1 + 1 file changed, 1 insertion(+)
arch/sparc/include/asm/hugetlb.h +1 -0
@@ -24,6 +24,7 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,static inline pte_t huge_ptep_clear_flush (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep) { +return *ptep; }#define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
Signature · 5 lines
2.35.1 -- Cheers, Stephen Rothwell
Baolin Wang
Reviewed-byHi Stephen,
Quoted 18 lines · Stephen Rothwell
Hi all,
After merging the mm tree, today's linux-next build (sparc64 defconfig) failed like this:
In file included from
include/linux/hugetlb.h:757,
fromarch/sparc/mm/hugetlbpage.c:11:arch/sparc/include/asm/hugetlb.h: In function 'huge_ptep_clear_flush':arch/sparc/include/asm/hugetlb.h:27:1: error: no return statement in function returning non-void [-Werror=return-type]27 | } | ^(and many more)
Caused by commit
083af99303b9("mm: changehuge_ptep_clear_flush()to return the original pte")
Quoted 7 lines
I applied the following hack to make it build.
From: Stephen Rothwell <[email protected]>
Date: Wed, 11 May 2022 18:10:56 +1000
Subject: [PATCH] fix up for "mm: changehuge_ptep_clear_flush()to return the original pte"Signed-off-by Stephen Rothwell <[email protected]>
Sorry for my mistake. LGTM.
Quoted 16 lines
--- arch/sparc/include/asm/hugetlb.h | 1 + 1 file changed, 1 insertion(+)arch/sparc/include/asm/hugetlb.h +1
-0@@ -24,6 +24,7 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,static inline pte_t huge_ptep_clear_flush (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep) { +return *ptep; }#define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
Quoted 18 lines · Stephen Rothwell
Hi all,
After merging the mm tree, today's linux-next build (sparc64 defconfig) failed like this:
In file included from
include/linux/hugetlb.h:757,
fromarch/sparc/mm/hugetlbpage.c:11:arch/sparc/include/asm/hugetlb.h: In function 'huge_ptep_clear_flush':arch/sparc/include/asm/hugetlb.h:27:1: error: no return statement in function returning non-void [-Werror=return-type]27 | } | ^(and many more)
Caused by commit
083af99303b9("mm: changehuge_ptep_clear_flush()to return the original pte")
Quoted 7 lines
I applied the following hack to make it build.
From: Stephen Rothwell <[email protected]>
Date: Wed, 11 May 2022 18:10:56 +1000
Subject: [PATCH] fix up for "mm: changehuge_ptep_clear_flush()to return the original pte"Signed-off-by Stephen Rothwell <[email protected]>
Sorry again. I think I also missed other ARCHs' changes. Need include below fixes.
arch/ia64/include/asm/hugetlb.h +1 -0
@@ -26,6 +26,7 @@ static inline int is_hugepage_only_range(struct mm_struct *mm,static inline pte_t huge_ptep_clear_flush (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep) { +return *ptep; }#include <asm-generic/hugetlb.h>
arch/parisc/include/asm/hugetlb.h +1 -0
@@ -31,6 +31,7 @@ static inline int prepare_hugepage_range(struct file *file,static inline pte_t huge_ptep_clear_flush (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep) { +return *ptep; }#define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
arch/sh/include/asm/hugetlb.h +1 -0
@@ -24,6 +24,7 @@ static inline int prepare_hugepage_range(struct file *file,static inline pte_t huge_ptep_clear_flush (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep) { +return *ptep; }static inline void arch_clear_hugepage_flags (struct page *page)
arch/sparc/include/asm/hugetlb.h +1 -0
@@ -24,6 +24,7 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,static inline pte_t huge_ptep_clear_flush (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep) { +return *ptep; }#define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
Quoted 16 lines
--- arch/sparc/include/asm/hugetlb.h | 1 + 1 file changed, 1 insertion(+)arch/sparc/include/asm/hugetlb.h +1
-0@@ -24,6 +24,7 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,static inline pte_t huge_ptep_clear_flush (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep) { +return *ptep; }#define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
Hi Baolin,
Quoted 2 lines · On Wed, 11 May 2022 16:42:17 +0800 Baolin Wang <[email protected]>…
Sorry again. I think I also missed other ARCHs' changes. Need include below fixes.
I will add that to my fix up patch today (unless Andrew does a new release).
Thanks.
Signature · 2 lines
Cheers, Stephen Rothwell