From nobody Mon Feb 9 04:30:11 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B52A5C7EE24 for ; Mon, 5 Jun 2023 17:02:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235213AbjFERCA (ORCPT ); Mon, 5 Jun 2023 13:02:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235088AbjFERBt (ORCPT ); Mon, 5 Jun 2023 13:01:49 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ECB0F183 for ; Mon, 5 Jun 2023 10:01:42 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3B02B152B; Mon, 5 Jun 2023 10:02:28 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AD32B3F587; Mon, 5 Jun 2023 10:01:41 -0700 (PDT) From: Robin Murphy To: will@kernel.org Cc: mark.rutland@arm.com, suzuki.poulose@arm.com, bwicaksono@nvidia.com, ilkka@os.amperecomputing.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] perf/arm_cspmu: Fix event attribute type Date: Mon, 5 Jun 2023 18:01:31 +0100 Message-Id: <27c0804af64007b2400abbc40278f642ee6a0a29.1685983270.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" ARM_CSPMU_EVENT_ATTR() defines a struct perf_pmu_events_attr, so arm_cspmu_sysfs_event_show() should not be interpreting it as struct dev_ext_attribute. Fixes: e37dfd65731d ("perf: arm_cspmu: Add support for ARM CoreSight PMU dr= iver") Reviewed-by: Suzuki K Poulose Reviewed-and-tested-by: Ilkka Koskinen Signed-off-by: Robin Murphy --- Decided to stick with this rather than change the definition, because I like avoiding casts :) drivers/perf/arm_cspmu/arm_cspmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/ar= m_cspmu.c index a3f1c410b417..72dc7a9e1ca8 100644 --- a/drivers/perf/arm_cspmu/arm_cspmu.c +++ b/drivers/perf/arm_cspmu/arm_cspmu.c @@ -189,10 +189,10 @@ static inline bool use_64b_counter_reg(const struct a= rm_cspmu *cspmu) ssize_t arm_cspmu_sysfs_event_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct dev_ext_attribute *eattr =3D - container_of(attr, struct dev_ext_attribute, attr); - return sysfs_emit(buf, "event=3D0x%llx\n", - (unsigned long long)eattr->var); + struct perf_pmu_events_attr *pmu_attr; + + pmu_attr =3D container_of(attr, typeof(*pmu_attr), attr); + return sysfs_emit(buf, "event=3D0x%llx\n", pmu_attr->id); } EXPORT_SYMBOL_GPL(arm_cspmu_sysfs_event_show); =20 --=20 2.39.2.101.g768bb238c484.dirty From nobody Mon Feb 9 04:30:11 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F852C7EE23 for ; Mon, 5 Jun 2023 17:02:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235259AbjFERCH (ORCPT ); Mon, 5 Jun 2023 13:02:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234726AbjFERBu (ORCPT ); Mon, 5 Jun 2023 13:01:50 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A4C9219C for ; Mon, 5 Jun 2023 10:01:46 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0349BD75; Mon, 5 Jun 2023 10:02:32 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1C09C3F587; Mon, 5 Jun 2023 10:01:45 -0700 (PDT) From: Robin Murphy To: will@kernel.org Cc: mark.rutland@arm.com, suzuki.poulose@arm.com, bwicaksono@nvidia.com, ilkka@os.amperecomputing.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lorenzo Pieralisi , Sudeep Holla , Hanjun Guo Subject: [PATCH v2 2/4] ACPI/APMT: Don't register invalid resource Date: Mon, 5 Jun 2023 18:01:32 +0100 Message-Id: <63b34656e1f7b41bcb458fb6d7496e04db757e0d.1685983270.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Don't register a resource for the second page unless the dual-page extension flag is actually present to say it's valid. CC: Lorenzo Pieralisi CC: Sudeep Holla Reviewed-by: Suzuki K Poulose Reviewed-by: Hanjun Guo Reviewed-and-tested-by: Ilkka Koskinen Signed-off-by: Robin Murphy Acked-by: Lorenzo Pieralisi --- drivers/acpi/arm64/apmt.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/arm64/apmt.c b/drivers/acpi/arm64/apmt.c index 8cab69fa5d59..aa7d5c3c0dd8 100644 --- a/drivers/acpi/arm64/apmt.c +++ b/drivers/acpi/arm64/apmt.c @@ -35,11 +35,13 @@ static int __init apmt_init_resources(struct resource *= res, =20 num_res++; =20 - res[num_res].start =3D node->base_address1; - res[num_res].end =3D node->base_address1 + SZ_4K - 1; - res[num_res].flags =3D IORESOURCE_MEM; + if (node->flags & ACPI_APMT_FLAGS_DUAL_PAGE) { + res[num_res].start =3D node->base_address1; + res[num_res].end =3D node->base_address1 + SZ_4K - 1; + res[num_res].flags =3D IORESOURCE_MEM; =20 - num_res++; + num_res++; + } =20 if (node->ovflw_irq !=3D 0) { trigger =3D (node->ovflw_irq_flags & ACPI_APMT_OVFLW_IRQ_FLAGS_MODE); --=20 2.39.2.101.g768bb238c484.dirty From nobody Mon Feb 9 04:30:11 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71881C7EE23 for ; Mon, 5 Jun 2023 17:02:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235292AbjFERCJ (ORCPT ); Mon, 5 Jun 2023 13:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235151AbjFERBu (ORCPT ); Mon, 5 Jun 2023 13:01:50 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A3411F1 for ; Mon, 5 Jun 2023 10:01:48 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F30B8152B; Mon, 5 Jun 2023 10:02:33 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 714D13F587; Mon, 5 Jun 2023 10:01:47 -0700 (PDT) From: Robin Murphy To: will@kernel.org Cc: mark.rutland@arm.com, suzuki.poulose@arm.com, bwicaksono@nvidia.com, ilkka@os.amperecomputing.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] perf/arm_cspmu: Clean up ACPI dependency Date: Mon, 5 Jun 2023 18:01:33 +0100 Message-Id: <9d126711c7498b199b3e6f5cf48ca60ffb9df54c.1685983270.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Build-wise, the ACPI dependency consists of only a couple of things which could probably stand being factored out into ACPI helpers anyway. However for the immediate concern of working towards Devicetree support here, it's easy enough to make a few tweaks to contain the affected code locally, such that we can relax the Kconfig dependency. Reviewed-and-Tested-by: Suzuki K Poulose Reviewed-by: Ilkka Koskinen Signed-off-by: Robin Murphy --- drivers/perf/arm_cspmu/Kconfig | 3 +-- drivers/perf/arm_cspmu/arm_cspmu.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/perf/arm_cspmu/Kconfig b/drivers/perf/arm_cspmu/Kconfig index 0b316fe69a45..25d25ded0983 100644 --- a/drivers/perf/arm_cspmu/Kconfig +++ b/drivers/perf/arm_cspmu/Kconfig @@ -4,8 +4,7 @@ =20 config ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU tristate "ARM Coresight Architecture PMU" - depends on ARM64 && ACPI - depends on ACPI_APMT || COMPILE_TEST + depends on ARM64 || COMPILE_TEST help Provides support for performance monitoring unit (PMU) devices based on ARM CoreSight PMU architecture. Note that this PMU diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/ar= m_cspmu.c index 72dc7a9e1ca8..3b91115c376d 100644 --- a/drivers/perf/arm_cspmu/arm_cspmu.c +++ b/drivers/perf/arm_cspmu/arm_cspmu.c @@ -28,7 +28,6 @@ #include #include #include -#include =20 #include "arm_cspmu.h" #include "nvidia_cspmu.h" @@ -1075,6 +1074,9 @@ static int arm_cspmu_request_irq(struct arm_cspmu *cs= pmu) return 0; } =20 +#if defined(CONFIG_ACPI) && defined(CONFIG_ARM64) +#include + static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid) { u32 acpi_uid; @@ -1099,7 +1101,7 @@ static inline int arm_cspmu_find_cpu_container(int cp= u, u32 container_uid) return -ENODEV; } =20 -static int arm_cspmu_get_cpus(struct arm_cspmu *cspmu) +static int arm_cspmu_acpi_get_cpus(struct arm_cspmu *cspmu) { struct device *dev; struct acpi_apmt_node *apmt_node; @@ -1135,6 +1137,17 @@ static int arm_cspmu_get_cpus(struct arm_cspmu *cspm= u) =20 return 0; } +#else +static int arm_cspmu_acpi_get_cpus(struct arm_cspmu *cspmu) +{ + return -ENODEV; +} +#endif + +static int arm_cspmu_get_cpus(struct arm_cspmu *cspmu) +{ + return arm_cspmu_acpi_get_cpus(cspmu); +} =20 static int arm_cspmu_register_pmu(struct arm_cspmu *cspmu) { --=20 2.39.2.101.g768bb238c484.dirty From nobody Mon Feb 9 04:30:11 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9637C7EE23 for ; Mon, 5 Jun 2023 17:02:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235300AbjFERCN (ORCPT ); Mon, 5 Jun 2023 13:02:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235162AbjFERBz (ORCPT ); Mon, 5 Jun 2023 13:01:55 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F0A0A6 for ; Mon, 5 Jun 2023 10:01:51 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 90EA015BF; Mon, 5 Jun 2023 10:02:36 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0F4753F587; Mon, 5 Jun 2023 10:01:49 -0700 (PDT) From: Robin Murphy To: will@kernel.org Cc: mark.rutland@arm.com, suzuki.poulose@arm.com, bwicaksono@nvidia.com, ilkka@os.amperecomputing.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] perf/arm_cspmu: Decouple APMT dependency Date: Mon, 5 Jun 2023 18:01:34 +0100 Message-Id: <88f97268603e1aa6016d178982a1dc2861f6770d.1685983270.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The functional paths of the driver need not care about ACPI, so abstract the property of atomic doubleword access as its own flag (repacking the structure for a better fit). We also do not need to go poking directly at the APMT for standard resources which the ACPI layer has already dealt with, so deal with the optional MMIO page and interrupt in the normal firmware-agnostic manner. The few remaining portions of probing that *are* APMT-specific can still easily retrieve the APMT pointer as needed without us having to carry a duplicate copy around everywhere. Reviewed-by: Suzuki K Poulose Signed-off-by: Robin Murphy --- v2: Fix platdata dereferences, clean up now-unused acpi.h include too. --- drivers/perf/arm_cspmu/arm_cspmu.c | 54 ++++++++++-------------------- drivers/perf/arm_cspmu/arm_cspmu.h | 5 ++- 2 files changed, 19 insertions(+), 40 deletions(-) diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/ar= m_cspmu.c index 3b91115c376d..38e1170af347 100644 --- a/drivers/perf/arm_cspmu/arm_cspmu.c +++ b/drivers/perf/arm_cspmu/arm_cspmu.c @@ -100,10 +100,6 @@ #define ARM_CSPMU_ACTIVE_CPU_MASK 0x0 #define ARM_CSPMU_ASSOCIATED_CPU_MASK 0x1 =20 -/* Check if field f in flags is set with value v */ -#define CHECK_APMT_FLAG(flags, f, v) \ - ((flags & (ACPI_APMT_FLAGS_ ## f)) =3D=3D (ACPI_APMT_FLAGS_ ## f ## _ ## = v)) - /* Check and use default if implementer doesn't provide attribute callback= */ #define CHECK_DEFAULT_IMPL_OPS(ops, callback) \ do { \ @@ -121,6 +117,11 @@ =20 static unsigned long arm_cspmu_cpuhp_state; =20 +static struct acpi_apmt_node *arm_cspmu_apmt_node(struct device *dev) +{ + return *(struct acpi_apmt_node **)dev_get_platdata(dev); +} + /* * In CoreSight PMU architecture, all of the MMIO registers are 32-bit exc= ept * counter register. The counter register can be implemented as 32-bit or = 64-bit @@ -155,12 +156,6 @@ static u64 read_reg64_hilohi(const void __iomem *addr,= u32 max_poll_count) return val; } =20 -/* Check if PMU supports 64-bit single copy atomic. */ -static inline bool supports_64bit_atomics(const struct arm_cspmu *cspmu) -{ - return CHECK_APMT_FLAG(cspmu->apmt_node->flags, ATOMIC, SUPP); -} - /* Check if cycle counter is supported. */ static inline bool supports_cycle_counter(const struct arm_cspmu *cspmu) { @@ -319,7 +314,7 @@ static const char *arm_cspmu_get_name(const struct arm_= cspmu *cspmu) static atomic_t pmu_idx[ACPI_APMT_NODE_TYPE_COUNT] =3D { 0 }; =20 dev =3D cspmu->dev; - apmt_node =3D cspmu->apmt_node; + apmt_node =3D arm_cspmu_apmt_node(dev); pmu_type =3D apmt_node->type; =20 if (pmu_type >=3D ACPI_APMT_NODE_TYPE_COUNT) { @@ -396,8 +391,8 @@ static const struct impl_match impl_match[] =3D { static int arm_cspmu_init_impl_ops(struct arm_cspmu *cspmu) { int ret; - struct acpi_apmt_node *apmt_node =3D cspmu->apmt_node; struct arm_cspmu_impl_ops *impl_ops =3D &cspmu->impl.ops; + struct acpi_apmt_node *apmt_node =3D arm_cspmu_apmt_node(cspmu->dev); const struct impl_match *match =3D impl_match; =20 /* @@ -719,7 +714,7 @@ static u64 arm_cspmu_read_counter(struct perf_event *ev= ent) offset =3D counter_offset(sizeof(u64), event->hw.idx); counter_addr =3D cspmu->base1 + offset; =20 - return supports_64bit_atomics(cspmu) ? + return cspmu->has_atomic_dword ? readq(counter_addr) : read_reg64_hilohi(counter_addr, HILOHI_MAX_POLL); } @@ -910,24 +905,18 @@ static struct arm_cspmu *arm_cspmu_alloc(struct platf= orm_device *pdev) { struct acpi_apmt_node *apmt_node; struct arm_cspmu *cspmu; - struct device *dev; - - dev =3D &pdev->dev; - apmt_node =3D *(struct acpi_apmt_node **)dev_get_platdata(dev); - if (!apmt_node) { - dev_err(dev, "failed to get APMT node\n"); - return NULL; - } + struct device *dev =3D &pdev->dev; =20 cspmu =3D devm_kzalloc(dev, sizeof(*cspmu), GFP_KERNEL); if (!cspmu) return NULL; =20 cspmu->dev =3D dev; - cspmu->apmt_node =3D apmt_node; - platform_set_drvdata(pdev, cspmu); =20 + apmt_node =3D arm_cspmu_apmt_node(dev); + cspmu->has_atomic_dword =3D apmt_node->flags & ACPI_APMT_FLAGS_ATOMIC; + return cspmu; } =20 @@ -935,11 +924,9 @@ static int arm_cspmu_init_mmio(struct arm_cspmu *cspmu) { struct device *dev; struct platform_device *pdev; - struct acpi_apmt_node *apmt_node; =20 dev =3D cspmu->dev; pdev =3D to_platform_device(dev); - apmt_node =3D cspmu->apmt_node; =20 /* Base address for page 0. */ cspmu->base0 =3D devm_platform_ioremap_resource(pdev, 0); @@ -950,7 +937,7 @@ static int arm_cspmu_init_mmio(struct arm_cspmu *cspmu) =20 /* Base address for page 1 if supported. Otherwise point to page 0. */ cspmu->base1 =3D cspmu->base0; - if (CHECK_APMT_FLAG(apmt_node->flags, DUAL_PAGE, SUPP)) { + if (platform_get_resource(pdev, IORESOURCE_MEM, 1)) { cspmu->base1 =3D devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(cspmu->base1)) { dev_err(dev, "ioremap failed for page-1 resource\n"); @@ -1047,19 +1034,14 @@ static int arm_cspmu_request_irq(struct arm_cspmu *= cspmu) int irq, ret; struct device *dev; struct platform_device *pdev; - struct acpi_apmt_node *apmt_node; =20 dev =3D cspmu->dev; pdev =3D to_platform_device(dev); - apmt_node =3D cspmu->apmt_node; =20 /* Skip IRQ request if the PMU does not support overflow interrupt. */ - if (apmt_node->ovflw_irq =3D=3D 0) - return 0; - - irq =3D platform_get_irq(pdev, 0); + irq =3D platform_get_irq_optional(pdev, 0); if (irq < 0) - return irq; + return irq =3D=3D -ENXIO ? 0 : irq; =20 ret =3D devm_request_irq(dev, irq, arm_cspmu_handle_irq, IRQF_NOBALANCING | IRQF_NO_THREAD, dev_name(dev), @@ -1103,13 +1085,11 @@ static inline int arm_cspmu_find_cpu_container(int = cpu, u32 container_uid) =20 static int arm_cspmu_acpi_get_cpus(struct arm_cspmu *cspmu) { - struct device *dev; struct acpi_apmt_node *apmt_node; int affinity_flag; int cpu; =20 - dev =3D cspmu->pmu.dev; - apmt_node =3D cspmu->apmt_node; + apmt_node =3D arm_cspmu_apmt_node(cspmu->dev); affinity_flag =3D apmt_node->flags & ACPI_APMT_FLAGS_AFFINITY; =20 if (affinity_flag =3D=3D ACPI_APMT_FLAGS_AFFINITY_PROC) { @@ -1131,7 +1111,7 @@ static int arm_cspmu_acpi_get_cpus(struct arm_cspmu *= cspmu) } =20 if (cpumask_empty(&cspmu->associated_cpus)) { - dev_dbg(dev, "No cpu associated with the PMU\n"); + dev_dbg(cspmu->dev, "No cpu associated with the PMU\n"); return -ENODEV; } =20 diff --git a/drivers/perf/arm_cspmu/arm_cspmu.h b/drivers/perf/arm_cspmu/ar= m_cspmu.h index 51323b175a4a..83df53d1c132 100644 --- a/drivers/perf/arm_cspmu/arm_cspmu.h +++ b/drivers/perf/arm_cspmu/arm_cspmu.h @@ -8,7 +8,6 @@ #ifndef __ARM_CSPMU_H__ #define __ARM_CSPMU_H__ =20 -#include #include #include #include @@ -118,16 +117,16 @@ struct arm_cspmu_impl { struct arm_cspmu { struct pmu pmu; struct device *dev; - struct acpi_apmt_node *apmt_node; const char *name; const char *identifier; void __iomem *base0; void __iomem *base1; - int irq; cpumask_t associated_cpus; cpumask_t active_cpu; struct hlist_node cpuhp_node; + int irq; =20 + bool has_atomic_dword; u32 pmcfgr; u32 num_logical_ctrs; u32 num_set_clr_reg; --=20 2.39.2.101.g768bb238c484.dirty