[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y1ZT/FdOgMtsiMxk@hirez.programming.kicks-ass.net>
Date: Mon, 24 Oct 2022 10:59:40 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
x86@...nel.org, Dave Hansen <dave.hansen@...el.com>,
Borislav Petkov <bp@...en8.de>
Subject: Re: linux-next: build warning after merge of the tip tree
On Mon, Oct 24, 2022 at 11:28:45AM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> vmlinux.o: warning: objtool: get_cpu_entry_area+0x4: call to cea_offset() leaves .noinstr.text section
>
> Presumably something to do with commit
>
> 1248fb6a8201 ("x86/mm: Randomize per-cpu entry area")
Thanks, and yesh Boris said the same late on Friday... all the *SAN
stuff tickled the compiler's stupid bone again.
The below cures it, Dave, do we fold it in or mash on top?
diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c
index ad1f750517a1..a8f18e613190 100644
--- a/arch/x86/mm/cpu_entry_area.c
+++ b/arch/x86/mm/cpu_entry_area.c
@@ -18,7 +18,7 @@ DEFINE_PER_CPU(struct cea_exception_stacks*, cea_exception_stacks);
static DEFINE_PER_CPU_READ_MOSTLY(unsigned long, _cea_offset);
-static inline unsigned int cea_offset(unsigned int cpu)
+static __always_inline unsigned int cea_offset(unsigned int cpu)
{
return per_cpu(_cea_offset, cpu);
}
@@ -52,7 +52,7 @@ static __init void init_cea_offsets(void)
#else /* !X86_64 */
DECLARE_PER_CPU_PAGE_ALIGNED(struct doublefault_stack, doublefault_stack);
-static inline unsigned int cea_offset(unsigned int cpu)
+static __always_inline unsigned int cea_offset(unsigned int cpu)
{
return cpu;
}
Powered by blists - more mailing lists