[arm-perf:overflow-stack 10/13] arch/arm64/kernel/smp.c:450:23: sparse: sparse: cast removes address space '__percpu' of expression

kernel test robot <[email protected]> Thu, 30 Jul 2026 02:28:06 +0800
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git overflow-stack
head:   7c0748c59a858f301fc801a9818ea1c11ff88ff0
commit: d017f75e2f157a38b824c8f4253f07fac65622eb [10/13] arm64: entry: Point SP_EL0 at the overflow stack
config: arm64-randconfig-r111-20260729 (https://download.01.org/0day-ci/archive/20260730/[email protected]/config)
compiler: aarch64-linux-gcc (GCC) 9.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260730/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
>> arch/arm64/kernel/smp.c:450:23: sparse: sparse: cast removes address space '__percpu' of expression

vim +/__percpu +450 arch/arm64/kernel/smp.c

   447	
   448	static void __init set_boot_cpu_offset(void)
   449	{
 > 450		u64 ovf_sp = (u64)overflow_stack + OVERFLOW_STACK_SIZE;
   451	
   452		asm volatile(
   453		"	msr	tpidr_el1, %1\n"
   454		"	add	%0, %0, %1\n"
   455		"	msr	sp_el0, %0" /* Update the overflow stack pointer */
   456		: "+r" (ovf_sp)
   457		: "r" (per_cpu_offset(0))
   458		: "memory");
   459	}
   460	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki