Re: [linux-sunxi] [PATCH 3.4] sun7i: enable performance counters
On 03/29/2014 08:44 PM, Alejandro Mery wrote: On 27/03/14 13:00, Mans Rullgard wrote: The PMUs on sun7i use the undocumented IRQs 152 and 153 for core 0 and 1 respectively. Signed-off-by: Mans Rullgard --- arch/arm/plat-sunxi/devices.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/arm/plat-sunxi/devices.c b/arch/arm/plat-sunxi/devices.c index fdddc56..70fec7f 100644 --- a/arch/arm/plat-sunxi/devices.c +++ b/arch/arm/plat-sunxi/devices.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -113,13 +114,13 @@ struct platform_device sw_pdev_nand = .dev = {} }; -#ifndef CONFIG_ARCH_SUN7I static struct resource sunxi_pmu_resources[] = { - { - .start = SW_INT_IRQNO_PLE_PFM, - .end= SW_INT_IRQNO_PLE_PFM, - .flags = IORESOURCE_IRQ, - }, +#ifdef CONFIG_ARCH_SUN7I + DEFINE_RES_IRQ(152), + DEFINE_RES_IRQ(153), +#else + DEFINE_RES_IRQ(SW_INT_IRQNO_PLE_PFM), +#endif }; struct platform_device sunxi_pmu_device = { @@ -128,7 +129,6 @@ struct platform_device sunxi_pmu_device = { .resource = sunxi_pmu_resources, .num_resources = ARRAY_SIZE(sunxi_pmu_resources), }; -#endif #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) static struct platform_device sunxi_device_mali_drm = { @@ -143,9 +143,7 @@ static struct platform_device *sw_pdevs[] __initdata = { #endif &sw_pdev_dmac, &sw_pdev_nand, -#ifndef CONFIG_ARCH_SUN7I &sunxi_pmu_device, -#endif #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) &sunxi_device_mali_drm, #endif thanks! applied on stage/sunxi-3.4 time for a merge? If you merge this to sunxi-3.4 also push it into the BSP as the main goto kernel, right now, it relies on some ancient 3.0 which is long obsoleted. Olliver cheers, Alejandro Mery -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [linux-sunxi] [PATCH 3.4] sun7i: enable performance counters
On 27/03/14 13:00, Mans Rullgard wrote: The PMUs on sun7i use the undocumented IRQs 152 and 153 for core 0 and 1 respectively. Signed-off-by: Mans Rullgard --- arch/arm/plat-sunxi/devices.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/arm/plat-sunxi/devices.c b/arch/arm/plat-sunxi/devices.c index fdddc56..70fec7f 100644 --- a/arch/arm/plat-sunxi/devices.c +++ b/arch/arm/plat-sunxi/devices.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -113,13 +114,13 @@ struct platform_device sw_pdev_nand = .dev = {} }; -#ifndef CONFIG_ARCH_SUN7I static struct resource sunxi_pmu_resources[] = { - { - .start = SW_INT_IRQNO_PLE_PFM, - .end= SW_INT_IRQNO_PLE_PFM, - .flags = IORESOURCE_IRQ, - }, +#ifdef CONFIG_ARCH_SUN7I + DEFINE_RES_IRQ(152), + DEFINE_RES_IRQ(153), +#else + DEFINE_RES_IRQ(SW_INT_IRQNO_PLE_PFM), +#endif }; struct platform_device sunxi_pmu_device = { @@ -128,7 +129,6 @@ struct platform_device sunxi_pmu_device = { .resource = sunxi_pmu_resources, .num_resources = ARRAY_SIZE(sunxi_pmu_resources), }; -#endif #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) static struct platform_device sunxi_device_mali_drm = { @@ -143,9 +143,7 @@ static struct platform_device *sw_pdevs[] __initdata = { #endif &sw_pdev_dmac, &sw_pdev_nand, -#ifndef CONFIG_ARCH_SUN7I &sunxi_pmu_device, -#endif #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) &sunxi_device_mali_drm, #endif thanks! applied on stage/sunxi-3.4 time for a merge? cheers, Alejandro Mery -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [linux-sunxi] [PATCH 3.4] sun7i: enable performance counters
On Thu, 27 Mar 2014 12:00:25 + Mans Rullgard wrote: > The PMUs on sun7i use the undocumented IRQs 152 and 153 for core 0 and 1 > respectively. > > Signed-off-by: Mans Rullgard Thanks, this is a really nice find and now we get ARM performance counters working on all A1X/A20 devices. If nobody complains about the IRQ numbers not getting their own named constants in arch/arm/plat-sunxi/include/plat/irqs.h instead of the magic numbers Acked-by: Siarhei Siamashka > --- > arch/arm/plat-sunxi/devices.c | 16 +++- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/arch/arm/plat-sunxi/devices.c b/arch/arm/plat-sunxi/devices.c > index fdddc56..70fec7f 100644 > --- a/arch/arm/plat-sunxi/devices.c > +++ b/arch/arm/plat-sunxi/devices.c > @@ -30,6 +30,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -113,13 +114,13 @@ struct platform_device sw_pdev_nand = > .dev = {} > }; > > -#ifndef CONFIG_ARCH_SUN7I > static struct resource sunxi_pmu_resources[] = { > - { > - .start = SW_INT_IRQNO_PLE_PFM, > - .end= SW_INT_IRQNO_PLE_PFM, > - .flags = IORESOURCE_IRQ, > - }, > +#ifdef CONFIG_ARCH_SUN7I > + DEFINE_RES_IRQ(152), > + DEFINE_RES_IRQ(153), > +#else > + DEFINE_RES_IRQ(SW_INT_IRQNO_PLE_PFM), > +#endif > }; > > struct platform_device sunxi_pmu_device = { > @@ -128,7 +129,6 @@ struct platform_device sunxi_pmu_device = { > .resource = sunxi_pmu_resources, > .num_resources = ARRAY_SIZE(sunxi_pmu_resources), > }; > -#endif > > #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) > static struct platform_device sunxi_device_mali_drm = { > @@ -143,9 +143,7 @@ static struct platform_device *sw_pdevs[] __initdata = { > #endif > &sw_pdev_dmac, > &sw_pdev_nand, > -#ifndef CONFIG_ARCH_SUN7I > &sunxi_pmu_device, > -#endif > #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) > &sunxi_device_mali_drm, > #endif -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [linux-sunxi] [PATCH 3.4] sun7i: enable performance counters
On 03/27/2014 01:00 PM, Mans Rullgard wrote: The PMUs on sun7i use the undocumented IRQs 152 and 153 for core 0 and 1 respectively. Are these the performance counters people where complaining about them missing a few days ago? How did you obtain this information? Does the one IRQ apply to sun4i and sun5i as well? Thanks for figuring it all out however!! Olliver Signed-off-by: Mans Rullgard --- arch/arm/plat-sunxi/devices.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/arm/plat-sunxi/devices.c b/arch/arm/plat-sunxi/devices.c index fdddc56..70fec7f 100644 --- a/arch/arm/plat-sunxi/devices.c +++ b/arch/arm/plat-sunxi/devices.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -113,13 +114,13 @@ struct platform_device sw_pdev_nand = .dev = {} }; -#ifndef CONFIG_ARCH_SUN7I static struct resource sunxi_pmu_resources[] = { - { - .start = SW_INT_IRQNO_PLE_PFM, - .end= SW_INT_IRQNO_PLE_PFM, - .flags = IORESOURCE_IRQ, - }, +#ifdef CONFIG_ARCH_SUN7I + DEFINE_RES_IRQ(152), + DEFINE_RES_IRQ(153), +#else + DEFINE_RES_IRQ(SW_INT_IRQNO_PLE_PFM), +#endif }; struct platform_device sunxi_pmu_device = { @@ -128,7 +129,6 @@ struct platform_device sunxi_pmu_device = { .resource = sunxi_pmu_resources, .num_resources = ARRAY_SIZE(sunxi_pmu_resources), }; -#endif #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) static struct platform_device sunxi_device_mali_drm = { @@ -143,9 +143,7 @@ static struct platform_device *sw_pdevs[] __initdata = { #endif &sw_pdev_dmac, &sw_pdev_nand, -#ifndef CONFIG_ARCH_SUN7I &sunxi_pmu_device, -#endif #if defined(CONFIG_MALI_DRM) || defined(CONFIG_MALI_DRM_MODULE) &sunxi_device_mali_drm, #endif -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.