[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202601271250.ASHv58o3-lkp@intel.com>
Date: Tue, 27 Jan 2026 12:56:27 +0800
From: kernel test robot <lkp@...el.com>
To: Paul Mackerras <paulus@...abs.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Madhavan Srinivasan <maddy@...ux.ibm.com>
Subject: arch/powerpc/platforms/microwatt/smp.c:79:24: sparse:
sparse: cast removes address space '__iomem' of expression
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fcb70a56f4d81450114034b2c61f48ce7444a0e2
commit: aca95fb6bb572a77f39d42d83ab72a965026577d powerpc/microwatt: Add SMP support
date: 11 months ago
config: powerpc64-randconfig-r123-20260126 (https://download.01.org/0day-ci/archive/20260127/202601271250.ASHv58o3-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260127/202601271250.ASHv58o3-lkp@intel.com/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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601271250.ASHv58o3-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/platforms/microwatt/smp.c:79:24: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/microwatt/smp.c:79:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void * @@
arch/powerpc/platforms/microwatt/smp.c:79:24: sparse: expected void [noderef] __iomem *addr
arch/powerpc/platforms/microwatt/smp.c:79:24: sparse: got void *
vim +/__iomem +79 arch/powerpc/platforms/microwatt/smp.c
42
43 void __init microwatt_init_smp(void)
44 {
45 volatile unsigned char __iomem *syscon;
46 int ncpus;
47 int timeout;
48
49 syscon = early_ioremap(SYSCON_BASE, SYSCON_LENGTH);
50 if (syscon == NULL) {
51 pr_err("Failed to map SYSCON\n");
52 return;
53 }
54 ncpus = (readl(syscon + SYSCON_CPU_CTRL) >> 8) & 0xff;
55 if (ncpus < 2)
56 goto out;
57
58 smp_ops = µwatt_smp_ops;
59
60 /*
61 * Write two instructions at location 0:
62 * mfspr r3, PIR
63 * b __secondary_hold
64 */
65 *(unsigned int *)KERNELBASE = PPC_RAW_MFSPR(3, SPRN_PIR);
66 *(unsigned int *)(KERNELBASE+4) = PPC_RAW_BRANCH(&__secondary_hold - (char *)(KERNELBASE+4));
67
68 /* enable the other CPUs, they start at location 0 */
69 writel((1ul << ncpus) - 1, syscon + SYSCON_CPU_CTRL);
70
71 timeout = 10000;
72 while (!__secondary_hold_acknowledge) {
73 if (--timeout == 0)
74 break;
75 barrier();
76 }
77
78 out:
> 79 early_iounmap((void *)syscon, SYSCON_LENGTH);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists