Commit 8d75537b authored by Rob Herring (Arm)'s avatar Rob Herring (Arm) Committed by Will Deacon

perf/arm: Move 32-bit PMU drivers to drivers/perf/

It is preferred to put drivers under drivers/ rather than under arch/.
The PMU drivers also depend on arm_pmu.c, so it's better to place them
all together.
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20240626-arm-pmu-3-9-icntr-v2-3-c9784b4f4065@kernel.orgSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 598c1a2d
...@@ -78,8 +78,6 @@ obj-$(CONFIG_CPU_XSC3) += xscale-cp0.o ...@@ -78,8 +78,6 @@ obj-$(CONFIG_CPU_XSC3) += xscale-cp0.o
obj-$(CONFIG_CPU_MOHAWK) += xscale-cp0.o obj-$(CONFIG_CPU_MOHAWK) += xscale-cp0.o
obj-$(CONFIG_IWMMXT) += iwmmxt.o obj-$(CONFIG_IWMMXT) += iwmmxt.o
obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o
obj-$(CONFIG_HW_PERF_EVENTS) += perf_event_xscale.o perf_event_v6.o \
perf_event_v7.o
AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o
obj-$(CONFIG_VDSO) += vdso.o obj-$(CONFIG_VDSO) += vdso.o
......
...@@ -56,6 +56,18 @@ config ARM_PMU ...@@ -56,6 +56,18 @@ config ARM_PMU
Say y if you want to use CPU performance monitors on ARM-based Say y if you want to use CPU performance monitors on ARM-based
systems. systems.
config ARM_V6_PMU
depends on ARM_PMU && (CPU_V6 || CPU_V6K)
def_bool y
config ARM_V7_PMU
depends on ARM_PMU && CPU_V7
def_bool y
config ARM_XSCALE_PMU
depends on ARM_PMU && CPU_XSCALE
def_bool y
config RISCV_PMU config RISCV_PMU
depends on RISCV depends on RISCV
bool "RISC-V PMU framework" bool "RISC-V PMU framework"
......
...@@ -6,6 +6,9 @@ obj-$(CONFIG_ARM_DSU_PMU) += arm_dsu_pmu.o ...@@ -6,6 +6,9 @@ obj-$(CONFIG_ARM_DSU_PMU) += arm_dsu_pmu.o
obj-$(CONFIG_ARM_PMU) += arm_pmu.o arm_pmu_platform.o obj-$(CONFIG_ARM_PMU) += arm_pmu.o arm_pmu_platform.o
obj-$(CONFIG_ARM_PMU_ACPI) += arm_pmu_acpi.o obj-$(CONFIG_ARM_PMU_ACPI) += arm_pmu_acpi.o
obj-$(CONFIG_ARM_PMUV3) += arm_pmuv3.o obj-$(CONFIG_ARM_PMUV3) += arm_pmuv3.o
obj-$(CONFIG_ARM_V6_PMU) += arm_v6_pmu.o
obj-$(CONFIG_ARM_V7_PMU) += arm_v7_pmu.o
obj-$(CONFIG_ARM_XSCALE_PMU) += arm_xscale_pmu.o
obj-$(CONFIG_ARM_SMMU_V3_PMU) += arm_smmuv3_pmu.o obj-$(CONFIG_ARM_SMMU_V3_PMU) += arm_smmuv3_pmu.o
obj-$(CONFIG_FSL_IMX8_DDR_PMU) += fsl_imx8_ddr_perf.o obj-$(CONFIG_FSL_IMX8_DDR_PMU) += fsl_imx8_ddr_perf.o
obj-$(CONFIG_FSL_IMX9_DDR_PMU) += fsl_imx9_ddr_perf.o obj-$(CONFIG_FSL_IMX9_DDR_PMU) += fsl_imx9_ddr_perf.o
......
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
* enable the interrupt. * enable the interrupt.
*/ */
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
#include <asm/cputype.h> #include <asm/cputype.h>
#include <asm/irq_regs.h> #include <asm/irq_regs.h>
...@@ -445,4 +443,3 @@ static struct platform_driver armv6_pmu_driver = { ...@@ -445,4 +443,3 @@ static struct platform_driver armv6_pmu_driver = {
}; };
builtin_platform_driver(armv6_pmu_driver); builtin_platform_driver(armv6_pmu_driver);
#endif /* CONFIG_CPU_V6 || CONFIG_CPU_V6K */
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
* counter and all 4 performance counters together can be reset separately. * counter and all 4 performance counters together can be reset separately.
*/ */
#ifdef CONFIG_CPU_V7
#include <asm/cp15.h> #include <asm/cp15.h>
#include <asm/cputype.h> #include <asm/cputype.h>
#include <asm/irq_regs.h> #include <asm/irq_regs.h>
...@@ -2002,4 +2000,3 @@ static struct platform_driver armv7_pmu_driver = { ...@@ -2002,4 +2000,3 @@ static struct platform_driver armv7_pmu_driver = {
}; };
builtin_platform_driver(armv7_pmu_driver); builtin_platform_driver(armv7_pmu_driver);
#endif /* CONFIG_CPU_V7 */
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
* PMU structures. * PMU structures.
*/ */
#ifdef CONFIG_CPU_XSCALE
#include <asm/cputype.h> #include <asm/cputype.h>
#include <asm/irq_regs.h> #include <asm/irq_regs.h>
...@@ -745,4 +743,3 @@ static struct platform_driver xscale_pmu_driver = { ...@@ -745,4 +743,3 @@ static struct platform_driver xscale_pmu_driver = {
}; };
builtin_platform_driver(xscale_pmu_driver); builtin_platform_driver(xscale_pmu_driver);
#endif /* CONFIG_CPU_XSCALE */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment