From: Simon Horman <horms@verge.net.au>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 2/2] ARM: shmobile: emev2: enable PMU(Performance Monitoring Unit)
Date: Wed, 05 Sep 2012 02:58:48 +0000 [thread overview]
Message-ID: <20120905025848.GH4232@verge.net.au> (raw)
In-Reply-To: <1346813317-4030-3-git-send-email-koba@kmckk.co.jp>
On Wed, Sep 05, 2012 at 11:48:37AM +0900, Tetsuyuki Kobayshi wrote:
> From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
>
> 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 <koba@kmckk.co.jp>
> ---
> 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 <asm/mach/map.h>
> #include <asm/mach/time.h>
> #include <asm/hardware/gic.h>
> +#include <asm/pmu.h>
>
> 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
>
next prev parent reply other threads:[~2012-09-05 2:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-05 2:48 [PATCH 2/2] ARM: shmobile: emev2: enable PMU(Performance Monitoring Unit) Tetsuyuki Kobayshi
2012-09-05 2:58 ` Simon Horman [this message]
2012-09-05 4:25 ` Tetsuyuki Kobayashi
2012-09-05 8:20 ` Magnus Damm
2012-09-05 9:00 ` Tetsuyuki Kobayashi
-- strict thread matches above, loose matches on Subject: below --
2012-09-11 8:05 [GIT] Renesas ARM-based SoC: pmu/cleanup for 3.7 Simon Horman
2012-09-11 8:05 ` [PATCH 2/2] ARM: shmobile: emev2: enable PMU(Performance Monitoring Unit) Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120905025848.GH4232@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).