From: Marc Zyngier <maz@kernel.org>
To: Will Deacon <will@kernel.org>, kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [arm-platforms:irq/ppi-affinity 18/25] drivers/perf/arm_pmu.c:68:35: sparse: sparse: cast removes address space '__percpu' of expression
Date: Mon, 15 Sep 2025 09:40:24 +0100 [thread overview]
Message-ID: <861po8cdmv.wl-maz@kernel.org> (raw)
In-Reply-To: <202509150852.4ziBllm5-lkp@intel.com>
On Mon, 15 Sep 2025 01:21:29 +0100,
kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/ppi-affinity
> head: 136dedfe26e7de871029de6ed7dcf555e840fadc
> commit: 49964285d3074f0494d8f09dce6e120d623b7843 [18/25] perf: arm_pmu: Request specific affinities for percpu NMI/IRQ
> config: arm-randconfig-r132-20250915 (https://download.01.org/0day-ci/archive/20250915/202509150852.4ziBllm5-lkp@intel.com/config)
> compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 21857ae337e0892a5522b6e7337899caa61de2a6)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250915/202509150852.4ziBllm5-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/202509150852.4ziBllm5-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> >> drivers/perf/arm_pmu.c:68:35: sparse: sparse: cast removes address space '__percpu' of expression
> >> drivers/perf/arm_pmu.c:68:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void ** @@
> drivers/perf/arm_pmu.c:68:35: sparse: expected void const [noderef] __percpu *__vpp_verify
> drivers/perf/arm_pmu.c:68:35: sparse: got void **
> >> drivers/perf/arm_pmu.c:68:35: sparse: sparse: cast removes address space '__percpu' of expression
> >> drivers/perf/arm_pmu.c:68:35: sparse: sparse: cast removes address space '__percpu' of expression
> drivers/perf/arm_pmu.c:95:35: sparse: sparse: cast removes address space '__percpu' of expression
> drivers/perf/arm_pmu.c:95:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got void ** @@
> drivers/perf/arm_pmu.c:95:35: sparse: expected void const [noderef] __percpu *__vpp_verify
> drivers/perf/arm_pmu.c:95:35: sparse: got void **
> drivers/perf/arm_pmu.c:95:35: sparse: sparse: cast removes address space '__percpu' of expression
> drivers/perf/arm_pmu.c:95:35: sparse: sparse: cast removes address space '__percpu' of expression
>
> vim +/__percpu +68 drivers/perf/arm_pmu.c
>
> 64
> 65 static void armpmu_free_percpu_pmuirq(unsigned int irq, int cpu,
> 66 void __percpu *devid)
> 67 {
> > 68 struct arm_pmu *armpmu = *per_cpu_ptr((void **)devid, cpu);
> 69
> 70 if (armpmu_count_irq_users(&armpmu->supported_cpus, irq) == 1)
> 71 free_percpu_irq(irq, devid);
> 72 }
> 73
I'll squash this in before posting the series:
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
index e427675446894..7171d8e0d27a5 100644
--- a/drivers/perf/arm_pmu.c
+++ b/drivers/perf/arm_pmu.c
@@ -65,7 +65,7 @@ static void armpmu_enable_percpu_pmuirq(unsigned int irq)
static void armpmu_free_percpu_pmuirq(unsigned int irq, int cpu,
void __percpu *devid)
{
- struct arm_pmu *armpmu = *per_cpu_ptr((void **)devid, cpu);
+ struct arm_pmu *armpmu = *per_cpu_ptr((void * __percpu *)devid, cpu);
if (armpmu_count_irq_users(&armpmu->supported_cpus, irq) == 1)
free_percpu_irq(irq, devid);
@@ -92,7 +92,7 @@ static void armpmu_disable_percpu_pmunmi(unsigned int irq)
static void armpmu_free_percpu_pmunmi(unsigned int irq, int cpu,
void __percpu *devid)
{
- struct arm_pmu *armpmu = *per_cpu_ptr((void **)devid, cpu);
+ struct arm_pmu *armpmu = *per_cpu_ptr((void * __percpu *)devid, cpu);
if (armpmu_count_irq_users(&armpmu->supported_cpus, irq) == 1)
free_percpu_nmi(irq, devid);
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2025-09-15 8:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 0:21 [arm-platforms:irq/ppi-affinity 18/25] drivers/perf/arm_pmu.c:68:35: sparse: sparse: cast removes address space '__percpu' of expression kernel test robot
2025-09-15 8:40 ` Marc Zyngier [this message]
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=861po8cdmv.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=will@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.