From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Horman Date: Wed, 05 Sep 2012 02:58:48 +0000 Subject: Re: [PATCH 2/2] ARM: shmobile: emev2: enable PMU(Performance Monitoring Unit) Message-Id: <20120905025848.GH4232@verge.net.au> List-Id: References: <1346813317-4030-3-git-send-email-koba@kmckk.co.jp> In-Reply-To: <1346813317-4030-3-git-send-email-koba@kmckk.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-sh@vger.kernel.org On Wed, Sep 05, 2012 at 11:48:37AM +0900, Tetsuyuki Kobayshi wrote: > From: Tetsuyuki Kobayashi > > This patch enables PMU(Performance Monitoring Unit) for emev2 when compiled with CONFIG_HW_PERF_EVENTS. Hi Kobayshi-san, Is it appropriate to enable this in the defconfig? If so, could you send an updated patch? > > Signed-off-by: Tetsuyuki Kobayashi > --- > arch/arm/mach-shmobile/setup-emev2.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c > index dae9aa6..f3ff171 100644 > --- a/arch/arm/mach-shmobile/setup-emev2.c > +++ b/arch/arm/mach-shmobile/setup-emev2.c > @@ -36,6 +36,7 @@ > #include > #include > #include > +#include > > static struct map_desc emev2_io_desc[] __initdata = { > #ifdef CONFIG_SMP > @@ -356,6 +357,28 @@ static struct platform_device gio4_device = { > }, > }; > > +#ifdef CONFIG_HW_PERF_EVENTS > +static struct resource pmu_resources[] = { > + [0] = { > + .start = 152, > + .end = 152, > + .flags = IORESOURCE_IRQ, > + }, > + [1] = { > + .start = 153, > + .end = 153, > + .flags = IORESOURCE_IRQ, > + }, > +}; > + > +static struct platform_device pmu_device = { > + .name = "arm-pmu", > + .id = ARM_PMU_DEVICE_CPU, > + .num_resources = ARRAY_SIZE(pmu_resources), > + .resource = pmu_resources, > +}; > +#endif > + > static struct platform_device *emev2_early_devices[] __initdata = { > &uart0_device, > &uart1_device, > @@ -370,6 +393,9 @@ static struct platform_device *emev2_late_devices[] __initdata = { > &gio2_device, > &gio3_device, > &gio4_device, > +#ifdef CONFIG_HW_PERF_EVENTS > + &pmu_device, > +#endif > }; > > void __init emev2_add_standard_devices(void) > -- > 1.7.9.5 >