From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F409FCAC597 for ; Mon, 15 Sep 2025 08:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4HtoPMsE9SX8KlqVgahmYprZZ3H87MUytra5RjXqUME=; b=gVb3ibiPficnmAj4PKr0/LRYsn Bl21Cx7ZHJvSFbA/OhvA3P81a11dthtkkZb/XKIyr9ContruWjtIH6nRlw0M8QZFqutkjShfx7Awg 6uU6nYrvCSlkyZlnIkMn4tEqNPJXNAQjeTt5Ia/RfmWypzrgOU3joQ9V78wUt3tpIiVnPjf/VXS5l ibmnQzhGWS+junVIpJKo2k+pLXyjSK9NBxU21m4jibGUI0lvgg8V+WAvguP4NBqJczv5Bt1efldo3 g9IyTCI1OjLf7yJ6+lbOMXb5r5ScpWXVgRFw/JO1hHPEYz0MUb108/28146+IMXbDFGxdBqgnpQve fwOFcoOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uy4lA-00000003FyR-49ri; Mon, 15 Sep 2025 08:40:28 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uy4l9-00000003Fy8-3KeZ for linux-arm-kernel@lists.infradead.org; Mon, 15 Sep 2025 08:40:27 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 3B31660193; Mon, 15 Sep 2025 08:40:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF715C4CEF1; Mon, 15 Sep 2025 08:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757925626; bh=1jCFiBr+qjXT/5UiDcf8H2ZeLPlBgMeCldx90ZjHgKA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=N0X5lOfNW8lUdgTtjI+cgthoXYqlrLiP9ITymqBg7KZGrKq7j5jeBU7eo3MJHJoD7 3TDmh6l2VS47dbySiNlkOqxBPiEO5Brsoa8pF4/jvq+jbAsNoYW8XgRWBPIwwD2kdB TVJ4+3kyuChD8O+BXLZQf+QGCqMcLHkEpYJK6pKw/sUD5ksaAvy7GcVeeQGYMeCXW2 szZs8AfeRmxpgkwi/wTHNuPMJy+aVuhQJNYL1PKUr9P6/dtOz3R/J+qoeoUaoC5CJZ b0pNgrwwxa2LXISoYssZaN0TW4Bhk+VMIn55xijkB9jwoi9sV1K2sjVqefosP6kHMe WWMRpMVsJyMfg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1uy4l6-00000006HwN-2YsP; Mon, 15 Sep 2025 08:40:24 +0000 Date: Mon, 15 Sep 2025 09:40:24 +0100 Message-ID: <861po8cdmv.wl-maz@kernel.org> From: Marc Zyngier To: Will Deacon , kernel test robot 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 In-Reply-To: <202509150852.4ziBllm5-lkp@intel.com> References: <202509150852.4ziBllm5-lkp@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: will@kernel.org, lkp@intel.com, oe-kbuild-all@lists.linux.dev, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 15 Sep 2025 01:21:29 +0100, kernel test robot 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 > | 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.