diff mbox series

[2/9] perf: arm_v6/7_pmu: Drop non-DT probe support

Message ID 20240607-arm-pmu-3-9-icntr-v1-2-c7bd2dceff3b@kernel.org (mailing list archive)
State New, archived
Headers show
Series arm64: Add support for Armv9.4 PMU fixed instruction counter | expand

Commit Message

Rob Herring (Arm) June 7, 2024, 8:31 p.m. UTC
There are no non-DT based PMU users for v6 or v7, so drop the custom
non-DT probe table.

Note that this drops support for arm1156 PMU, but there are no arm1156
based systems supported in the kernel.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 drivers/perf/arm_v6_pmu.c | 17 +----------------
 drivers/perf/arm_v7_pmu.c | 10 +---------
 2 files changed, 2 insertions(+), 25 deletions(-)

Comments

Mark Rutland June 10, 2024, 9:30 a.m. UTC | #1
On Fri, Jun 07, 2024 at 02:31:27PM -0600, Rob Herring (Arm) wrote:
> There are no non-DT based PMU users for v6 or v7, so drop the custom
> non-DT probe table.
> 
> Note that this drops support for arm1156 PMU, but there are no arm1156
> based systems supported in the kernel.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

It might be worth adding an explciit note that xscale still has non-DT
support, and hence we need to retain the infrastructure for that.

Regardless:

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

Mark.

> ---
>  drivers/perf/arm_v6_pmu.c | 17 +----------------
>  drivers/perf/arm_v7_pmu.c | 10 +---------
>  2 files changed, 2 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/perf/arm_v6_pmu.c b/drivers/perf/arm_v6_pmu.c
> index f7593843bb85..0bb685b4bac5 100644
> --- a/drivers/perf/arm_v6_pmu.c
> +++ b/drivers/perf/arm_v6_pmu.c
> @@ -401,13 +401,6 @@ static int armv6_1136_pmu_init(struct arm_pmu *cpu_pmu)
>  	return 0;
>  }
>  
> -static int armv6_1156_pmu_init(struct arm_pmu *cpu_pmu)
> -{
> -	armv6pmu_init(cpu_pmu);
> -	cpu_pmu->name		= "armv6_1156";
> -	return 0;
> -}
> -
>  static int armv6_1176_pmu_init(struct arm_pmu *cpu_pmu)
>  {
>  	armv6pmu_init(cpu_pmu);
> @@ -421,17 +414,9 @@ static const struct of_device_id armv6_pmu_of_device_ids[] = {
>  	{ /* sentinel value */ }
>  };
>  
> -static const struct pmu_probe_info armv6_pmu_probe_table[] = {
> -	ARM_PMU_PROBE(ARM_CPU_PART_ARM1136, armv6_1136_pmu_init),
> -	ARM_PMU_PROBE(ARM_CPU_PART_ARM1156, armv6_1156_pmu_init),
> -	ARM_PMU_PROBE(ARM_CPU_PART_ARM1176, armv6_1176_pmu_init),
> -	{ /* sentinel value */ }
> -};
> -
>  static int armv6_pmu_device_probe(struct platform_device *pdev)
>  {
> -	return arm_pmu_device_probe(pdev, armv6_pmu_of_device_ids,
> -				    armv6_pmu_probe_table);
> +	return arm_pmu_device_probe(pdev, armv6_pmu_of_device_ids, NULL);
>  }
>  
>  static struct platform_driver armv6_pmu_driver = {
> diff --git a/drivers/perf/arm_v7_pmu.c b/drivers/perf/arm_v7_pmu.c
> index fdd936fbd188..928ac3d626ed 100644
> --- a/drivers/perf/arm_v7_pmu.c
> +++ b/drivers/perf/arm_v7_pmu.c
> @@ -1977,17 +1977,9 @@ static const struct of_device_id armv7_pmu_of_device_ids[] = {
>  	{},
>  };
>  
> -static const struct pmu_probe_info armv7_pmu_probe_table[] = {
> -	ARM_PMU_PROBE(ARM_CPU_PART_CORTEX_A8, armv7_a8_pmu_init),
> -	ARM_PMU_PROBE(ARM_CPU_PART_CORTEX_A9, armv7_a9_pmu_init),
> -	{ /* sentinel value */ }
> -};
> -
> -
>  static int armv7_pmu_device_probe(struct platform_device *pdev)
>  {
> -	return arm_pmu_device_probe(pdev, armv7_pmu_of_device_ids,
> -				    armv7_pmu_probe_table);
> +	return arm_pmu_device_probe(pdev, armv7_pmu_of_device_ids, NULL);
>  }
>  
>  static struct platform_driver armv7_pmu_driver = {
> 
> -- 
> 2.43.0
>
diff mbox series

Patch

diff --git a/drivers/perf/arm_v6_pmu.c b/drivers/perf/arm_v6_pmu.c
index f7593843bb85..0bb685b4bac5 100644
--- a/drivers/perf/arm_v6_pmu.c
+++ b/drivers/perf/arm_v6_pmu.c
@@ -401,13 +401,6 @@  static int armv6_1136_pmu_init(struct arm_pmu *cpu_pmu)
 	return 0;
 }
 
-static int armv6_1156_pmu_init(struct arm_pmu *cpu_pmu)
-{
-	armv6pmu_init(cpu_pmu);
-	cpu_pmu->name		= "armv6_1156";
-	return 0;
-}
-
 static int armv6_1176_pmu_init(struct arm_pmu *cpu_pmu)
 {
 	armv6pmu_init(cpu_pmu);
@@ -421,17 +414,9 @@  static const struct of_device_id armv6_pmu_of_device_ids[] = {
 	{ /* sentinel value */ }
 };
 
-static const struct pmu_probe_info armv6_pmu_probe_table[] = {
-	ARM_PMU_PROBE(ARM_CPU_PART_ARM1136, armv6_1136_pmu_init),
-	ARM_PMU_PROBE(ARM_CPU_PART_ARM1156, armv6_1156_pmu_init),
-	ARM_PMU_PROBE(ARM_CPU_PART_ARM1176, armv6_1176_pmu_init),
-	{ /* sentinel value */ }
-};
-
 static int armv6_pmu_device_probe(struct platform_device *pdev)
 {
-	return arm_pmu_device_probe(pdev, armv6_pmu_of_device_ids,
-				    armv6_pmu_probe_table);
+	return arm_pmu_device_probe(pdev, armv6_pmu_of_device_ids, NULL);
 }
 
 static struct platform_driver armv6_pmu_driver = {
diff --git a/drivers/perf/arm_v7_pmu.c b/drivers/perf/arm_v7_pmu.c
index fdd936fbd188..928ac3d626ed 100644
--- a/drivers/perf/arm_v7_pmu.c
+++ b/drivers/perf/arm_v7_pmu.c
@@ -1977,17 +1977,9 @@  static const struct of_device_id armv7_pmu_of_device_ids[] = {
 	{},
 };
 
-static const struct pmu_probe_info armv7_pmu_probe_table[] = {
-	ARM_PMU_PROBE(ARM_CPU_PART_CORTEX_A8, armv7_a8_pmu_init),
-	ARM_PMU_PROBE(ARM_CPU_PART_CORTEX_A9, armv7_a9_pmu_init),
-	{ /* sentinel value */ }
-};
-
-
 static int armv7_pmu_device_probe(struct platform_device *pdev)
 {
-	return arm_pmu_device_probe(pdev, armv7_pmu_of_device_ids,
-				    armv7_pmu_probe_table);
+	return arm_pmu_device_probe(pdev, armv7_pmu_of_device_ids, NULL);
 }
 
 static struct platform_driver armv7_pmu_driver = {