[openeuler:OLK-5.10 2987/2987] arch/arm64/kernel/arm64_cpu_park.c:140:17: sparse: sparse: incorrect type in argument 2 (different address spaces)

Hi Kefeng, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: ab082f7137232cc372aad2eceb59b0ec98d0d9fb commit: ba25d7467b3040d98290a140256303ba190ef376 [2987/2987] arm64: cpu_park: Move into stand-alone file config: arm64-randconfig-r133-20250628 (https://download.01.org/0day-ci/archive/20250628/202506280616.okoJpSCx-lkp@i...) compiler: aarch64-linux-gcc (GCC) 10.5.0 reproduce: (https://download.01.org/0day-ci/archive/20250628/202506280616.okoJpSCx-lkp@i...) 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 <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506280616.okoJpSCx-lkp@intel.com/ sparse warnings: (new ones prefixed by >>)
arch/arm64/kernel/arm64_cpu_park.c:140:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned long *[assigned] park_exit @@ arch/arm64/kernel/arm64_cpu_park.c:140:17: sparse: expected void volatile [noderef] __iomem *addr arch/arm64/kernel/arm64_cpu_park.c:140:17: sparse: got unsigned long *[assigned] park_exit
vim +140 arch/arm64/kernel/arm64_cpu_park.c 112 113 /* 114 * Write the secondary_entry to exit section of park state. 115 * Then the secondary cpu will jump straight into the kernel 116 * by the secondary_entry. 117 */ 118 int write_park_exit(unsigned int cpu) 119 { 120 struct cpu_park_section *park_section; 121 unsigned long *park_exit; 122 unsigned long *park_text; 123 124 if (mmap_cpu_park_mem() != 0) 125 return -EPERM; 126 127 park_section = (struct cpu_park_section *)cpu_park_section_v(cpu); 128 park_exit = &park_section->exit; 129 park_text = (unsigned long *)park_section->text; 130 pr_debug("park_text 0x%lx : 0x%lx, do_cpu_park text 0x%lx : 0x%lx", 131 (unsigned long)park_text, *park_text, 132 (unsigned long)do_cpu_park, 133 *(unsigned long *)do_cpu_park); 134 135 /* 136 * Test first 8 bytes to determine 137 * whether needs to write cpu park exit. 138 */ 139 if (*park_text == *(unsigned long *)do_cpu_park) {
140 writeq_relaxed(__pa_symbol(secondary_entry), park_exit); 141 __flush_dcache_area((__force void *)park_exit, 142 sizeof(unsigned long)); 143 flush_icache_range((unsigned long)park_exit, 144 (unsigned long)(park_exit + 1)); 145 sev(); 146 dsb(sy); 147 isb(); 148 149 pr_debug("Write cpu %u secondary entry 0x%lx to 0x%lx.", 150 cpu, *park_exit, (unsigned long)park_exit); 151 pr_info("Boot cpu %u from PARK state.", cpu); 152 return 0; 153 } 154 155 return -EPERM; 156 } 157
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot