Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 0/2] Apple M2 PMU support
       [not found] <20230214-apple_m2_pmu-v1-0-9c9213ab9b63@jannau.net>
@ 2023-02-14 10:44 ` Hector Martin
       [not found] ` <20230214-apple_m2_pmu-v1-1-9c9213ab9b63@jannau.net>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: Hector Martin @ 2023-02-14 10:44 UTC (permalink / raw)
  To: Janne Grunau, Will Deacon, Mark Rutland, Rob Herring,
	Krzysztof Kozlowski
  Cc: asahi, linux-arm-kernel, devicetree, linux-kernel

On 14/02/2023 19.38, Janne Grunau wrote:
> This small series adds support for the PMU in Apple M2 cores. The PMU
> itself appears to work in the same way as om M1. We still want to add
> CPU type specific compatible strings so that we can distinguish counters
> in the case they count (slightly) different things on different CPU
> uarchs.
> 
> Signed-off-by: Janne Grunau <j@jannau.net>
> ---
> Janne Grunau (2):
>       dt-bindings: arm-pmu: Add PMU compatible strings for Apple M2 cores
>       drivers/perf: apple_m1: Add Apple M2 support
> 
>  Documentation/devicetree/bindings/arm/pmu.yaml |  2 ++
>  drivers/perf/apple_m1_cpu_pmu.c                | 14 ++++++++++++++
>  2 files changed, 16 insertions(+)
> ---
> base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
> change-id: 20230214-apple_m2_pmu-175b75c74d4e

For the series,

Reviewed-by: Hector Martin <marcan@marcan.st>

- Hector

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] dt-bindings: arm-pmu: Add PMU compatible strings for Apple M2 cores
       [not found] ` <20230214-apple_m2_pmu-v1-1-9c9213ab9b63@jannau.net>
@ 2023-02-15 20:46   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2023-02-15 20:46 UTC (permalink / raw)
  To: Janne Grunau
  Cc: devicetree, Rob Herring, Krzysztof Kozlowski, Mark Rutland,
	linux-kernel, linux-arm-kernel, asahi, Will Deacon


On Tue, 14 Feb 2023 11:38:01 +0100, Janne Grunau wrote:
> The PMUs on the Apple M2 cores avalanche and blizzard CPU are compatible
> with M1 ones. As on M1 we don't know exactly what the counters count so
> use a distinct compatible for each micro-architecture.
> Apple's PMU counter description omits a counter for M2 so there
> is some variation on the interpretation of the counters.
> 
> Signed-off-by: Janne Grunau <j@jannau.net>
> ---
>  Documentation/devicetree/bindings/arm/pmu.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] drivers/perf: apple_m1: Add Apple M2 support
       [not found] ` <20230214-apple_m2_pmu-v1-2-9c9213ab9b63@jannau.net>
@ 2023-03-24 14:00   ` Mark Rutland
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2023-03-24 14:00 UTC (permalink / raw)
  To: Janne Grunau, Will Deacon
  Cc: Rob Herring, Krzysztof Kozlowski, asahi, linux-arm-kernel,
	devicetree, linux-kernel

On Tue, Feb 14, 2023 at 11:38:02AM +0100, Janne Grunau wrote:
> The PMU itself is compatible with the one found on M1. We still know
> next to nothing about the counters so keep using CPU uarch specific
> compatibles/PMU names.
> 
> Signed-off-by: Janne Grunau <j@jannau.net>

Acked-by: Mark Rutland <mark.rutland@arm.com.

Will, I assume that you'll pick this up.

> ---
>  drivers/perf/apple_m1_cpu_pmu.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/perf/apple_m1_cpu_pmu.c b/drivers/perf/apple_m1_cpu_pmu.c
> index 979a7c2b4f56..83b74c7fe63f 100644
> --- a/drivers/perf/apple_m1_cpu_pmu.c
> +++ b/drivers/perf/apple_m1_cpu_pmu.c
> @@ -559,7 +559,21 @@ static int m1_pmu_fire_init(struct arm_pmu *cpu_pmu)
>  	return m1_pmu_init(cpu_pmu);
>  }
>  
> +static int m2_pmu_avalanche_init(struct arm_pmu *cpu_pmu)
> +{
> +	cpu_pmu->name = "apple_avalanche_pmu";
> +	return m1_pmu_init(cpu_pmu);
> +}
> +
> +static int m2_pmu_blizzard_init(struct arm_pmu *cpu_pmu)
> +{
> +	cpu_pmu->name = "apple_blizzard_pmu";
> +	return m1_pmu_init(cpu_pmu);
> +}
> +
>  static const struct of_device_id m1_pmu_of_device_ids[] = {
> +	{ .compatible = "apple,avalanche-pmu",	.data = m2_pmu_avalanche_init, },
> +	{ .compatible = "apple,blizzard-pmu",	.data = m2_pmu_blizzard_init, },
>  	{ .compatible = "apple,icestorm-pmu",	.data = m1_pmu_ice_init, },
>  	{ .compatible = "apple,firestorm-pmu",	.data = m1_pmu_fire_init, },
>  	{ },
> 
> -- 
> 2.39.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Apple M2 PMU support
       [not found] <20230214-apple_m2_pmu-v1-0-9c9213ab9b63@jannau.net>
                   ` (2 preceding siblings ...)
       [not found] ` <20230214-apple_m2_pmu-v1-2-9c9213ab9b63@jannau.net>
@ 2023-03-27 15:01 ` Will Deacon
  3 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2023-03-27 15:01 UTC (permalink / raw)
  To: Mark Rutland, Rob Herring, Janne Grunau, Krzysztof Kozlowski
  Cc: catalin.marinas, kernel-team, Will Deacon, devicetree,
	linux-kernel, asahi, linux-arm-kernel

On Tue, 14 Feb 2023 11:38:00 +0100, Janne Grunau wrote:
> This small series adds support for the PMU in Apple M2 cores. The PMU
> itself appears to work in the same way as om M1. We still want to add
> CPU type specific compatible strings so that we can distinguish counters
> in the case they count (slightly) different things on different CPU
> uarchs.
> 
> 
> [...]

Applied to will (for-next/perf), thanks!

[1/2] dt-bindings: arm-pmu: Add PMU compatible strings for Apple M2 cores
      https://git.kernel.org/will/c/640a3b7a3d13
[2/2] drivers/perf: apple_m1: Add Apple M2 support
      https://git.kernel.org/will/c/7d0bfb7c9977

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-27 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230214-apple_m2_pmu-v1-0-9c9213ab9b63@jannau.net>
2023-02-14 10:44 ` [PATCH 0/2] Apple M2 PMU support Hector Martin
     [not found] ` <20230214-apple_m2_pmu-v1-1-9c9213ab9b63@jannau.net>
2023-02-15 20:46   ` [PATCH 1/2] dt-bindings: arm-pmu: Add PMU compatible strings for Apple M2 cores Rob Herring
     [not found] ` <20230214-apple_m2_pmu-v1-2-9c9213ab9b63@jannau.net>
2023-03-24 14:00   ` [PATCH 2/2] drivers/perf: apple_m1: Add Apple M2 support Mark Rutland
2023-03-27 15:01 ` [PATCH 0/2] Apple M2 PMU support Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox