From: kernel test robot <lkp@intel.com>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Madhavan Srinivasan <maddy@linux.ibm.com>
Subject: arch/powerpc/platforms/microwatt/smp.c:79:24: sparse: sparse: cast removes address space '__iomem' of expression
Date: Tue, 27 Jan 2026 08:36:30 +0800 [thread overview]
Message-ID: <202601270858.uYxcZR9p-lkp@intel.com> (raw)
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/202601270858.uYxcZR9p-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/202601270858.uYxcZR9p-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601270858.uYxcZR9p-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
next reply other threads:[~2026-01-27 0:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 0:36 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-01-27 4:56 arch/powerpc/platforms/microwatt/smp.c:79:24: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot
2025-12-14 5:13 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202601270858.uYxcZR9p-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maddy@linux.ibm.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paulus@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox