[aegl:rdt-aet-v4 30/31] arch/x86/kernel/cpu/resctrl/intel_aet.c:247:62: sparse: sparse: incorrect type in initializer (different address spaces)

kernel test robot <[email protected]> Wed, 7 May 2025 14:19:56 +0800
Newsgroups gmane.linux.ports.ia64
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git rdt-aet-v4
head:   fb3c11ab090e476b565e4dfaec4afbc0465b1fc9
commit: ed4a6c1e59de38ca0465251dc3c12207ba629259 [30/31] x86/resctrl: Add info/PERF_PKG_MON/status file
config: x86_64-randconfig-121-20250502 (https://download.01.org/0day-ci/archive/20250507/[email protected]/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/[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/x86/kernel/cpu/resctrl/intel_aet.c:247:62: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned long long [usertype] *[noderef] __iomem info @@     got void [noderef] __iomem * @@
   arch/x86/kernel/cpu/resctrl/intel_aet.c:247:62: sparse:     expected unsigned long long [usertype] *[noderef] __iomem info
   arch/x86/kernel/cpu/resctrl/intel_aet.c:247:62: sparse:     got void [noderef] __iomem *
>> arch/x86/kernel/cpu/resctrl/intel_aet.c:251:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned long long [usertype] * @@
   arch/x86/kernel/cpu/resctrl/intel_aet.c:251:31: sparse:     expected void const volatile [noderef] __iomem *addr
   arch/x86/kernel/cpu/resctrl/intel_aet.c:251:31: sparse:     got unsigned long long [usertype] *
   arch/x86/kernel/cpu/resctrl/intel_aet.c:253:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned long long [usertype] * @@
   arch/x86/kernel/cpu/resctrl/intel_aet.c:253:31: sparse:     expected void const volatile [noderef] __iomem *addr
   arch/x86/kernel/cpu/resctrl/intel_aet.c:253:31: sparse:     got unsigned long long [usertype] *
   arch/x86/kernel/cpu/resctrl/intel_aet.c:255:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got unsigned long long [usertype] * @@
   arch/x86/kernel/cpu/resctrl/intel_aet.c:255:31: sparse:     expected void const volatile [noderef] __iomem *addr
   arch/x86/kernel/cpu/resctrl/intel_aet.c:255:31: sparse:     got unsigned long long [usertype] *
>> arch/x86/kernel/cpu/resctrl/intel_aet.c:251:27: sparse: sparse: dereference of noderef expression
>> arch/x86/kernel/cpu/resctrl/intel_aet.c:251:27: sparse: sparse: dereference of noderef expression
   arch/x86/kernel/cpu/resctrl/intel_aet.c:253:27: sparse: sparse: dereference of noderef expression
   arch/x86/kernel/cpu/resctrl/intel_aet.c:253:27: sparse: sparse: dereference of noderef expression
   arch/x86/kernel/cpu/resctrl/intel_aet.c:255:27: sparse: sparse: dereference of noderef expression
   arch/x86/kernel/cpu/resctrl/intel_aet.c:255:27: sparse: sparse: dereference of noderef expression

vim +247 arch/x86/kernel/cpu/resctrl/intel_aet.c

   244	
   245	static void show_debug(struct seq_file *s, struct event_group *e, int pkg, int instance)
   246	{
 > 247		u64 *info __iomem = e->pkginfo[pkg]->addrs[instance] + e->mmio_size;
   248	
   249		/* Information registers are the last three qwords in MMIO space */
   250		seq_printf(s, "%s %d:%d agg_data_loss_count = %llu\n", e->name, pkg, instance,
 > 251			   readq(&info[-3]));
   252		seq_printf(s, "%s %d:%d agg_data_loss_timestamp = %llu\n", e->name, pkg, instance,
   253			   readq(&info[-2]));
   254		seq_printf(s, "%s %d:%d last_update_timestamp = %llu\n", e->name, pkg, instance,
   255			   readq(&info[-1]));
   256	}
   257	

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