linux-next: build warning after merge of the mm tree
Subsystems (3)
Hi all,
After merging the mm tree, today's linux-next build (sparc64 defconfig) produced this warning:
In file included from include/linux/wait.h:11,
from include/linux/swait.h:8,
from include/linux/completion.h:12,
from include/linux/mm_types.h:14,
from include/linux/uio.h:10,
from include/linux/vmalloc.h:12,
from include/asm-generic/io.h:994,
from arch/sparc/include/asm/io.h:22,
from arch/sparc/vdso/vclock_gettime.c:18:arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
18 | register struct task_struct *current asm("g4");
| ^~~~~~~
I guess the immediate cause is commit
4e29dd9708cb ("mm: vmalloc: convert vread() to vread_iter()")
from the mm that included linux/uio.h into include/linux/vmalloc.h. Though there may be a deeper old cause that may need addressing in the longer term.
Indeed, this patch (obviously) makes the warning go away (and presumably speeds up the build ever so slightly :-)).
From: Stephen Rothwell <[email protected]>
Date: Mon, 20 Mar 2023 14:02:18 +1100
Subject: [PATCH] mm: vmalloc: fix sparc64 warning
This fixes this warning from a sparc64 defconfig build:
In file included from /home/sfr/next/next/include/linux/wait.h:11,
from /home/sfr/next/next/include/linux/swait.h:8,
from /home/sfr/next/next/include/linux/completion.h:12,
from /home/sfr/next/next/include/linux/mm_types.h:14,
from /home/sfr/next/next/include/linux/uio.h:10,
from /home/sfr/next/next/include/linux/vmalloc.h:12,
from /home/sfr/next/next/include/asm-generic/io.h:994,
from /home/sfr/next/next/arch/sparc/include/asm/io.h:22,
from /home/sfr/next/next/arch/sparc/vdso/vclock_gettime.c:18:/home/sfr/next/next/arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
18 | register struct task_struct *current asm("g4");
| ^~~~~~~
--- include/linux/vmalloc.h | 2 +- mm/vmalloc.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
include/linux/vmalloc.h +1 -1
@@ -9,12 +9,12 @@#include <asm/page.h> /* pgprot_t */ #include <linux/rbtree.h> #include <linux/overflow.h> -#include <linux/uio.h> #include <asm/vmalloc.h> struct vm_area_struct ;/* vma defining user mapping in mm_types.h */ struct notifier_block ;/* in notifier.h */ +struct iov_iter ;/* in uio.h */ /* bits in flags of vmalloc's vm_struct below */ #define VM_IOREMAP 0x00000001/* ioremap() and friends */
mm/vmalloc.c +1 -0
@@ -40,6 +40,7 @@#include <linux/hugetlb.h> #include <linux/sched/mm.h> #include <linux/rwsem.h> +#include <linux/uio.h> #include <asm/tlbflush.h> #include <asm/shmparam.h>
Signature · 5 lines
2.39.2 -- Cheers, Stephen Rothwell
Hi all,
Quoted 13 lines · On Mon, 20 Mar 2023 14:47:21 +1100 Stephen Rothwell <[email protected]>…
After merging the mm tree, today's linux-next build (sparc64 defconfig) produced this warning:
In file included from
include/linux/wait.h:11,from include/linux/swait.h:8, from include/linux/completion.h:12, from include/linux/mm_types.h:14, from include/linux/uio.h:10, from include/linux/vmalloc.h:12, from include/asm-generic/io.h:994, from arch/sparc/include/asm/io.h:22, from arch/sparc/vdso/vclock_gettime.c:18:
Quoted 3 lines
arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
18 | register structtask_struct*currentasm("g4");
| ^~~~~~~
This has come back today. Did my fix up get dropped accidentally?
Signature · 2 lines
Cheers, Stephen Rothwell
Andrew Morton
maintainerQuoted 5 lines · On Thu, 23 Mar 2023 13:58:35 +1100 Stephen Rothwell <[email protected]>…
Quoted 3 lines
arch/sparc/include/asm/current.h:18:30: warning: call-clobbered register used for global register variable
18 | register structtask_struct*currentasm("g4");
| ^~~~~~~This has come back today. Did my fix up get dropped accidentally?
Yes, looks like Lorenzo didn't integrate that fixup when redoing. And I failed to check for that (I usually do...).