arm: specify PMU type in platform data
Subsystems (6)
v2 cover arm: specify PMU type in platform data
Currently the ARMv6, ARMv7, and XScale PMU drivers are coupled with each other, and all included in the same c file. To enable the splitting of the ARMv6, ARMv7, and XScale PMU drivers, and the conversion of the arm_pmu framework to a pure library, we need to be a be more precise when describing PMUs, to enable association of the PMU with the right driver. In device tree this is already implicit in the compatible string, but platform data currently only specifies "arm-pmu".
Commit 253d8c3d2518ca6f (arm: perf: add more specific platform device IDs) added "armv6-pmu", "armv7-pmu", and "xscale-pmu" platform device IDs, enabling the three to be distinguished. This series updates platform code to use these strings.
A later patch series will decouple the drivers.
Since v1 [1]:
* Rebase to v3.19-rc4.
* Add Acks.
* Drop vexpress patches (platform code deleted).
Simon, in v1 you mentioned you were happy to take the shmobile patch through your tree. Are you still happy to do so, or to give your ack such that these can go through arm-soc together?
While I'm not too concerned which route these patches take, it would be nice to have a single base for the patches splitting the drivers.
Thanks,
Mark.
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/304078.html
Mark Rutland (5):
arm: realview: specify PMU types
arm: pxa: specify PMUs are for XScale CPUs
arm: iop: specify PMUs are for XScale CPUs
arm: shmobile: specify PMUs are for ARMv7 CPUs
arm: omap: specify PMUs are for ARMv7 CPUs
arch/arm/mach-omap2/pmu.c | 5 +++-- arch/arm/mach-pxa/devices.c | 2 +- arch/arm/mach-realview/realview_eb.c | 3 ++- arch/arm/mach-realview/realview_pb1176.c | 2 +- arch/arm/mach-realview/realview_pb11mp.c | 2 +- arch/arm/mach-realview/realview_pba8.c | 2 +- arch/arm/mach-realview/realview_pbx.c | 2 +- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +- arch/arm/plat-iop/pmu.c | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-)
Signature · 1 line
1.9.1
PATCH v2 1/5 arm: realview: specify PMU types
Now that we can specify which PMU variant we're likely to deal with, do so in the realview board code. This will allow us to split the ARMv6, ARMv7, and XScale PMU drivers.
The Realview EB may be used with ARMv6 or ARMv7 CPUs, but luckily there's only a single ARMv7 CPU, so we can match that explicitly to determine whether or not we have an ARMv7 PMU.
--- arch/arm/mach-realview/realview_eb.c | 3 ++- arch/arm/mach-realview/realview_pb1176.c | 2 +- arch/arm/mach-realview/realview_pb11mp.c | 2 +- arch/arm/mach-realview/realview_pba8.c | 2 +- arch/arm/mach-realview/realview_pbx.c | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/mach-realview/realview_eb.c +2 -1
@@ -37,6 +37,7 @@#include <asm/pgtable.h> #include <asm/hardware/cache-l2x0.h> #include <asm/smp_twd.h> +#include <asm/system_info.h> #include <asm/mach/arch.h> #include <asm/mach/map.h>
@@ -296,7 +297,6 @@ static struct resource pmu_resources[] = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , .id =-1 , .num_resources =ARRAY_SIZE (pmu_resources), .resource = pmu_resources,
@@ -451,6 +451,7 @@ static void __init realview_eb_init(void)*/ l2x0_init (__io_address (REALVIEW_EB11MP_L220_BASE ),0x00790000 ,0xfe000fff );#endif + pmu_device.name =core_tile_a9mp () ?"armv7-pmu" :"armv6-pmu" ;platform_device_register (&pmu_device); }
arch/arm/mach-realview/realview_pb1176.c +1 -1
@@ -280,7 +280,7 @@ static struct resource pmu_resource = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , + .name ="armv6-pmu" , .id =-1 , .num_resources =1 , .resource = &pmu_resource,
arch/arm/mach-realview/realview_pb11mp.c +1 -1
@@ -262,7 +262,7 @@ static struct resource pmu_resources[] = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , + .name ="armv6-pmu" , .id =-1 , .num_resources =ARRAY_SIZE (pmu_resources), .resource = pmu_resources,
arch/arm/mach-realview/realview_pba8.c +1 -1
@@ -240,7 +240,7 @@ static struct resource pmu_resource = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , + .name ="armv7-pmu" , .id =-1 , .num_resources =1 , .resource = &pmu_resource,
arch/arm/mach-realview/realview_pbx.c +1 -1
@@ -280,7 +280,7 @@ static struct resource pmu_resources[] = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , + .name ="armv7-pmu" , .id =-1 , .num_resources =ARRAY_SIZE (pmu_resources), .resource = pmu_resources,
Signature · 1 line
1.9.1
PATCH v2 2/5 arm: pxa: specify PMUs are for XScale CPUs
In reply to Mark RutlandNow that we can specify which PMU variant we're likely to deal with, do so in the pxa board code. This will allow us to split the ARMv6, ARMv7, and XScale PMU drivers.
--- arch/arm/mach-pxa/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-pxa/devices.c +1 -1
@@ -40,7 +40,7 @@ static struct resource pxa_resource_pmu = { };struct platform_device pxa_device_pmu = { - .name ="arm-pmu" , + .name ="xscale-pmu" , .id =-1 , .resource = &pxa_resource_pmu, .num_resources =1 ,
Signature · 1 line
1.9.1
PATCH v2 3/5 arm: iop: specify PMUs are for XScale CPUs
In reply to Mark RutlandNow that we can specify which PMU variant we're likely to deal with, do so in the iop board code. This will allow us to split the ARMv6, ARMv7, and XScale PMU drivers.
--- arch/arm/plat-iop/pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/plat-iop/pmu.c +1 -1
@@ -24,7 +24,7 @@ static struct resource pmu_resource = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , + .name ="xscale-pmu" , .id =-1 , .resource = &pmu_resource, .num_resources =1 ,
Signature · 1 line
1.9.1
PATCH v2 4/5 arm: shmobile: specify PMUs are for ARMv7 CPUs
In reply to Mark RutlandNow that we can specify which PMU variant we're likely to deal with, do so in the shmobile board code. This will allow us to split the ARMv6, ARMv7, and XScale PMU drivers
--- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-shmobile/setup-r8a7740.c +1 -1
@@ -656,7 +656,7 @@ static struct resource pmu_resources[] = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , + .name ="armv7-pmu" , .id =-1 , .num_resources =ARRAY_SIZE (pmu_resources), .resource = pmu_resources,
arch/arm/mach-shmobile/setup-sh73a0.c +1 -1
@@ -563,7 +563,7 @@ static struct resource pmu_resources[] = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , + .name ="armv7-pmu" , .id =-1 , .num_resources =ARRAY_SIZE (pmu_resources), .resource = pmu_resources,
Signature · 1 line
1.9.1
PATCH v2 4/5 arm: shmobile: specify PMUs are for ARMv7 CPUs
Quoted 9 lines · Mark Rutland
Now that we can specify which PMU variant we're likely to deal with, do so in the shmobile board code. This will allow us to split the ARMv6, ARMv7, and XScale PMU drivers
Signed-off-by Mark Rutland <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Magnus Damm <[email protected]>Cc Olof Johansson <[email protected]>Cc Simon Horman <[email protected]>
Quoted 40 lines
--- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/arm/mach-shmobile/setup-r8a7740.c +1
-1@@ -656,7 +656,7 @@ static struct resource pmu_resources[] = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , + .name ="armv7-pmu" , .id =-1 , .num_resources =ARRAY_SIZE (pmu_resources), .resource = pmu_resources,arch/arm/mach-shmobile/setup-sh73a0.c +1
-1@@ -563,7 +563,7 @@ static struct resource pmu_resources[] = { };static struct platform_device pmu_device = { - .name ="arm-pmu" , + .name ="armv7-pmu" , .id =-1 , .num_resources =ARRAY_SIZE (pmu_resources), .resource = pmu_resources,Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v2 5/5 arm: omap: specify PMUs are for ARMv7 CPUs
In reply to Mark RutlandNow that we can specify which PMU variant we're likely to deal with, do so in the omap board code. This will allow us to split the ARMv6, ARMv7, and XScale PMU drivers.
The unnecessary include of asm/pmu.h is also removed.
--- arch/arm/mach-omap2/pmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/pmu.c +3 -2
@@ -13,7 +13,7 @@*/ #include <linux/of.h> -#include <asm/pmu.h> +#include <asm/system_info.h> #include "soc.h" #include "omap_hwmod.h"
@@ -37,7 +37,8 @@ static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) {int i;struct omap_hwmod *oh[3 ]; -char *dev_name ="arm-pmu" ; +char *dev_name =cpu_architecture () == CPU_ARCH_ARMv6 ? +"armv6-pmu" :"armv7-pmu" ;if ((!oh_num) || (oh_num >3 ))return -EINVAL ;
Signature · 1 line
1.9.1
Tony Lindgren
maintainerPATCH v2 5/5 arm: omap: specify PMUs are for ARMv7 CPUs
Quoted 28 lines · Mark Rutland
Now that we can specify which PMU variant we're likely to deal with, do so in the omap board code. This will allow us to split the ARMv6, ARMv7, and XScale PMU drivers.
The unnecessary include of
asm/pmu.his also removed.Signed-off-by Mark Rutland <[email protected]>Acked-by Tony Lindgren <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Olof Johansson <[email protected]>--- arch/arm/mach-omap2/pmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-omap2/pmu.c +1
-1@@ -13,7 +13,7 @@*/ #include <linux/of.h> -#include <asm/pmu.h> +#include <asm/system_info.h> #include "soc.h" #include "omap_hwmod.h"
arch/arm/mach-omap2/pmu.c static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) · line 44
Quoted 9 lines
arch/arm/mach-omap2/pmu.c +2
-1@@ -37,7 +37,8 @@ static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) {int i;struct omap_hwmod *oh[3 ]; -char *dev_name ="arm-pmu" ; +char *dev_name =cpu_architecture () == CPU_ARCH_ARMv6 ? +"armv6-pmu" :"armv7-pmu" ;if ((!oh_num) || (oh_num >3 ))return -EINVAL ;
Looks OK to me and should not conflict with anything I have queued:
v2 cover arm: specify PMU type in platform data
In reply to Mark RutlandQuoted 20 lines · Mark Rutland
Currently the ARMv6, ARMv7, and XScale PMU drivers are coupled with each other, and all included in the same c file. To enable the splitting of the ARMv6, ARMv7, and XScale PMU drivers, and the conversion of the
arm_pmuframework to a pure library, we need to be a be more precise when describing PMUs, to enable association of the PMU with the right driver. In device tree this is already implicit in the compatible string, but platform data currently only specifies "arm-pmu".Commit
253d8c3d2518ca6f(arm: perf: add more specific platform device IDs) added "armv6-pmu", "armv7-pmu", and "xscale-pmu" platform device IDs, enabling the three to be distinguished. This series updates platform code to use these strings.A later patch series will decouple the drivers.
Since v1 [1]:
* Rebase to v3.19-rc4.
* Add Acks.
* Drop vexpress patches (platform code deleted).
Quoted 6 lines
Simon, in v1 you mentioned you were happy to take the shmobile patch through your tree. Are you still happy to do so, or to give your ack such that these can go through arm-soc together?
While I'm not too concerned which route these patches take, it would be nice to have a single base for the patches splitting the drivers.
Hi Mark,
assuming that this is targeted at v3.20 then it looks like your changes do not conflict with anything I have queued up and I am not likely to queue anything more up for the files in question for that release. As my main concern is about conflicts I'm therefore quite happy for you to take the shmobile patch through your tree. I'll supply an ack accordingly.
Quoted 33 lines
Thanks,
Mark.[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/304078.html
Mark Rutland (5):
arm: realview: specify PMU types
arm: pxa: specify PMUs are for XScale CPUs
arm: iop: specify PMUs are for XScale CPUs
arm: shmobile: specify PMUs are for ARMv7 CPUs
arm: omap: specify PMUs are for ARMv7 CPUsarch/arm/mach-omap2/pmu.c | 5 +++-- arch/arm/mach-pxa/devices.c | 2 +- arch/arm/mach-realview/realview_eb.c | 3 ++- arch/arm/mach-realview/realview_pb1176.c | 2 +- arch/arm/mach-realview/realview_pb11mp.c | 2 +- arch/arm/mach-realview/realview_pba8.c | 2 +- arch/arm/mach-realview/realview_pbx.c | 2 +- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +- arch/arm/plat-iop/pmu.c | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-)Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
v2 cover arm: specify PMU type in platform data
Quoted 28 lines · Simon Horman
Quoted 20 lines · Mark Rutland
Currently the ARMv6, ARMv7, and XScale PMU drivers are coupled with each other, and all included in the same c file. To enable the splitting of the ARMv6, ARMv7, and XScale PMU drivers, and the conversion of the
arm_pmuframework to a pure library, we need to be a be more precise when describing PMUs, to enable association of the PMU with the right driver. In device tree this is already implicit in the compatible string, but platform data currently only specifies "arm-pmu".Commit
253d8c3d2518ca6f(arm: perf: add more specific platform device IDs) added "armv6-pmu", "armv7-pmu", and "xscale-pmu" platform device IDs, enabling the three to be distinguished. This series updates platform code to use these strings.A later patch series will decouple the drivers.
Since v1 [1]:
* Rebase to v3.19-rc4.
* Add Acks.
* Drop vexpress patches (platform code deleted).Quoted 6 lines
Simon, in v1 you mentioned you were happy to take the shmobile patch through your tree. Are you still happy to do so, or to give your ack such that these can go through arm-soc together?
While I'm not too concerned which route these patches take, it would be nice to have a single base for the patches splitting the drivers.
Quoted 8 lines
Hi Mark,
assuming that this is targeted at v3.20 then it looks like your changes do not conflict with anything I have queued up and I am not likely to queue anything more up for the files in question for that release. As my main concern is about conflicts I'm therefore quite happy for you to take the shmobile patch through your tree. I'll supply an ack accordingly.
Thanks, Simon, it's much appreciated.
Arnd, Olof, are you happy to pick this up for v3.20? I believe all the patches have now been appropriately acked.
If it makes things any easier I've placed the series (with new acks) on my arm/perf/platform-updates branch [2], based atop of v3.19-rc4.
Thanks,
Mark.
[2] git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm/perf/platform-updates
Quoted 35 lines
Quoted 34 lines
Thanks,
Mark.[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/304078.html
Mark Rutland (5):
arm: realview: specify PMU types
arm: pxa: specify PMUs are for XScale CPUs
arm: iop: specify PMUs are for XScale CPUs
arm: shmobile: specify PMUs are for ARMv7 CPUs
arm: omap: specify PMUs are for ARMv7 CPUsarch/arm/mach-omap2/pmu.c | 5 +++-- arch/arm/mach-pxa/devices.c | 2 +- arch/arm/mach-realview/realview_eb.c | 3 ++- arch/arm/mach-realview/realview_pb1176.c | 2 +- arch/arm/mach-realview/realview_pb11mp.c | 2 +- arch/arm/mach-realview/realview_pba8.c | 2 +- arch/arm/mach-realview/realview_pbx.c | 2 +- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +- arch/arm/plat-iop/pmu.c | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-)Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
v2 cover arm: specify PMU type in platform data
[adding arm at kernel.org]
Arnd/Olof, are you happy to take these?
Everything has been appropriately acked, and as mentioned below the series can also be found on my kernel.org tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm/perf/platform-updates
Thanks,
Mark.
Quoted 92 lines · Mark Rutland
Quoted 28 lines · Simon Horman
Quoted 20 lines · Mark Rutland
Currently the ARMv6, ARMv7, and XScale PMU drivers are coupled with each other, and all included in the same c file. To enable the splitting of the ARMv6, ARMv7, and XScale PMU drivers, and the conversion of the
arm_pmuframework to a pure library, we need to be a be more precise when describing PMUs, to enable association of the PMU with the right driver. In device tree this is already implicit in the compatible string, but platform data currently only specifies "arm-pmu".Commit
253d8c3d2518ca6f(arm: perf: add more specific platform device IDs) added "armv6-pmu", "armv7-pmu", and "xscale-pmu" platform device IDs, enabling the three to be distinguished. This series updates platform code to use these strings.A later patch series will decouple the drivers.
Since v1 [1]:
* Rebase to v3.19-rc4.
* Add Acks.
* Drop vexpress patches (platform code deleted).Quoted 6 lines
Simon, in v1 you mentioned you were happy to take the shmobile patch through your tree. Are you still happy to do so, or to give your ack such that these can go through arm-soc together?
While I'm not too concerned which route these patches take, it would be nice to have a single base for the patches splitting the drivers.
Quoted 8 lines
Hi Mark,
assuming that this is targeted at v3.20 then it looks like your changes do not conflict with anything I have queued up and I am not likely to queue anything more up for the files in question for that release. As my main concern is about conflicts I'm therefore quite happy for you to take the shmobile patch through your tree. I'll supply an ack accordingly.
Thanks, Simon, it's much appreciated.
Arnd, Olof, are you happy to pick this up for v3.20? I believe all the patches have now been appropriately acked.
If it makes things any easier I've placed the series (with new acks) on my arm/perf/platform-updates branch [2], based atop of v3.19-rc4.
Thanks,
Mark.[2]
git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.gitarm/perf/platform-updatesQuoted 29 lines
Quoted 29 lines
Thanks,
Mark.[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-November/304078.html
Mark Rutland (5):
arm: realview: specify PMU types
arm: pxa: specify PMUs are for XScale CPUs
arm: iop: specify PMUs are for XScale CPUs
arm: shmobile: specify PMUs are for ARMv7 CPUs
arm: omap: specify PMUs are for ARMv7 CPUsarch/arm/mach-omap2/pmu.c | 5 +++-- arch/arm/mach-pxa/devices.c | 2 +- arch/arm/mach-realview/realview_eb.c | 3 ++- arch/arm/mach-realview/realview_pb1176.c | 2 +- arch/arm/mach-realview/realview_pb11mp.c | 2 +- arch/arm/mach-realview/realview_pba8.c | 2 +- arch/arm/mach-realview/realview_pbx.c | 2 +- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +- arch/arm/plat-iop/pmu.c | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-)Signature · 1 line
1.9.1Quoted 6 lines
Quoted 5 lines
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Olof Johansson
Appliedv2 cover arm: specify PMU type in platform data
Quoted 8 lines · Mark Rutland
[adding arm at kernel.org]
Arnd/Olof, are you happy to take these?
Everything has been appropriately acked, and as mentioned below the series can also be found on my kernel.org tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.gitarm/perf/platform-updates
Thanks, applied the patches to next/cleanup.
-Olof