Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Ilkka Koskinen <ilkka@os.amperecomputing.com>
To: Besar Wicaksono <bwicaksono@nvidia.com>
Cc: will@kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	 suzuki.poulose@arm.com, robin.murphy@arm.com,
	ilkka@os.amperecomputing.com,  mark.rutland@arm.com,
	treding@nvidia.com, jonathanh@nvidia.com,  vsethi@nvidia.com,
	rwiley@nvidia.com, sdonthineni@nvidia.com
Subject: Re: [PATCH 1/5] perf/arm_cspmu: Export arm_cspmu_apmt_node
Date: Tue, 19 Aug 2025 13:16:01 -0700 (PDT)	[thread overview]
Message-ID: <88a25a26-109d-b5cc-4bd2-776c3c2ba113@os.amperecomputing.com> (raw)
In-Reply-To: <20250812233411.1694012-2-bwicaksono@nvidia.com>


Hi Ben,

On Tue, 12 Aug 2025, Besar Wicaksono wrote:
> Make arm_cspmu_apmt_node API accessible to vendor driver.

I think I haven't seen the latest version of the spec. So, I'm curious,
what kind of information the table has that the vendor drivers needs to 
have access to it?

>
> Signed-off-by: Besar Wicaksono <bwicaksono@nvidia.com>
> ---
> drivers/perf/arm_cspmu/arm_cspmu.c | 3 ++-
> drivers/perf/arm_cspmu/arm_cspmu.h | 4 ++++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c
> index efa9b229e701..e4b98cfa606c 100644
> --- a/drivers/perf/arm_cspmu/arm_cspmu.c
> +++ b/drivers/perf/arm_cspmu/arm_cspmu.c
> @@ -70,12 +70,13 @@ static void arm_cspmu_set_ev_filter(struct arm_cspmu *cspmu,
> static void arm_cspmu_set_cc_filter(struct arm_cspmu *cspmu,
> 				    const struct perf_event *event);
>
> -static struct acpi_apmt_node *arm_cspmu_apmt_node(struct device *dev)
> +struct acpi_apmt_node *arm_cspmu_apmt_node(struct device *dev)
> {
> 	struct acpi_apmt_node **ptr = dev_get_platdata(dev);
>
> 	return ptr ? *ptr : NULL;
> }
> +EXPORT_SYMBOL_GPL(arm_cspmu_apmt_node);

Rather than exporting the function, wouldn't it be better to move it to 
arm_cspmu.h instead?

Cheers, Ilkka

>
> /*
>  * In CoreSight PMU architecture, all of the MMIO registers are 32-bit except
> diff --git a/drivers/perf/arm_cspmu/arm_cspmu.h b/drivers/perf/arm_cspmu/arm_cspmu.h
> index 19684b76bd96..36c1dcce33d6 100644
> --- a/drivers/perf/arm_cspmu/arm_cspmu.h
> +++ b/drivers/perf/arm_cspmu/arm_cspmu.h
> @@ -8,6 +8,7 @@
> #ifndef __ARM_CSPMU_H__
> #define __ARM_CSPMU_H__
>
> +#include <linux/acpi.h>
> #include <linux/bitfield.h>
> #include <linux/cpumask.h>
> #include <linux/device.h>
> @@ -222,4 +223,7 @@ int arm_cspmu_impl_register(const struct arm_cspmu_impl_match *impl_match);
> /* Unregister vendor backend. */
> void arm_cspmu_impl_unregister(const struct arm_cspmu_impl_match *impl_match);
>
> +/* Get ACPI APMT node. */
> +struct acpi_apmt_node *arm_cspmu_apmt_node(struct device *dev);
> +
> #endif /* __ARM_CSPMU_H__ */
> -- 
> 2.47.0
>
>

  reply	other threads:[~2025-08-19 20:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12 23:34 [PATCH 0/5] perf/arm_cspmu: Preparatory patches for NVIDIA T410 PMU Besar Wicaksono
2025-08-12 23:34 ` [PATCH 1/5] perf/arm_cspmu: Export arm_cspmu_apmt_node Besar Wicaksono
2025-08-19 20:16   ` Ilkka Koskinen [this message]
2025-08-20 19:07     ` Besar Wicaksono
2025-08-21 16:04       ` Robin Murphy
2025-08-22  1:28         ` Besar Wicaksono
2025-08-12 23:34 ` [PATCH 2/5] perf/arm_cspmu: Add callback to reset filter config Besar Wicaksono
2025-08-12 23:34 ` [PATCH 3/5] perf/arm_cspmu: Add pmpidr support Besar Wicaksono
2025-08-19 21:26   ` Ilkka Koskinen
2025-08-12 23:34 ` [PATCH 4/5] perf/arm_cspmu: nvidia: Add revision id matching Besar Wicaksono
2025-08-19 21:28   ` Ilkka Koskinen
2025-08-12 23:34 ` [PATCH 5/5] perf/arm_cspmu: nvidia: Add pmevfiltr2 support Besar Wicaksono

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=88a25a26-109d-b5cc-4bd2-776c3c2ba113@os.amperecomputing.com \
    --to=ilkka@os.amperecomputing.com \
    --cc=bwicaksono@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=rwiley@nvidia.com \
    --cc=sdonthineni@nvidia.com \
    --cc=suzuki.poulose@arm.com \
    --cc=treding@nvidia.com \
    --cc=vsethi@nvidia.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox