From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Jean Pihet <jean.pihet@newoldbits.com>
Cc: Kevin Hilman <khilman@ti.com>, Thomas Renninger <trenn@suse.de>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Jean Pihet-XID <j-pihet@ti.com>
Subject: RE: [PATCH] perf: add OMAP support for the new power events
Date: Mon, 21 Feb 2011 14:23:07 +0530 [thread overview]
Message-ID: <5dad46ab75a15145f907aeca53f769c1@mail.gmail.com> (raw)
In-Reply-To: <AANLkTiktdLja39dC38E_LciYZK7+pTp3_Sgm9jf5FA4R@mail.gmail.com>
> -----Original Message-----
> From: Jean Pihet [mailto:jean.pihet@newoldbits.com]
> Sent: Monday, February 21, 2011 2:14 PM
> To: Santosh Shilimkar
> Cc: Kevin Hilman; Thomas Renninger; linux-omap@vger.kernel.org;
> linux-arm-kernel@lists.infradead.org; Jean Pihet-XID
> Subject: Re: [PATCH] perf: add OMAP support for the new power events
>
> Hi Santosh,
>
[...]
> >> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-
> >> omap2/pm34xx.c
> >> index 2f864e4..d1cc3f4 100644
> >> --- a/arch/arm/mach-omap2/pm34xx.c
> >> +++ b/arch/arm/mach-omap2/pm34xx.c
> >> @@ -29,6 +29,7 @@
> >> #include <linux/delay.h>
> >> #include <linux/slab.h>
> >> #include <linux/console.h>
> >> +#include <trace/events/power.h>
> >>
> >> #include <plat/sram.h>
> >> #include "clockdomain.h"
> >> @@ -519,8 +520,14 @@ static void omap3_pm_idle(void)
> >> if (omap_irq_pending() || need_resched())
> >> goto out;
> >>
> >> + trace_power_start(POWER_CSTATE, 1, smp_processor_id());
> >> + trace_cpu_idle(1, smp_processor_id());
> >> +
> >
> > This default idle code won't be used when you enable the
> > CONFIG_CPUIDLE. That case the cpuidle34xx.c idle code gets
> > registered.
> That is correct. OMAP has a default idle handler (omap3_pm_idle) and
> a
> cpuidle handler (omap3_enter_idle in
> arch/arm/mach-omap2/cpuidle34xx.c).
>
> > Shouldn't you patch that code instead? This is more or less
> > dead code and it is just like default idle code when idle
> > drivers isn't registered.
> The cpuidle framework already is instrumented in a generic way. This
> code adds the instrumentation to the default idle handler so that
> all
> cases are covered. BTW the patch description gives that information.
>
> If there is dead code then it is not only the code from this patch
> but
> all the code for the default idle handler.
>
I read your change log. It says.
>> The trace points are for:
>> - default idle handler. Since the cpuidle framework is
>> instrumented in the generic way there is no need to
>> add trace points in the OMAP specific cpuidle handler;
Now code in cpuilde34xx.c is also OMAP specific and hence the
confusion at least for me.
Regarding dead code, I meant existing code of default handler.
Thanks for clarification.
Regards,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-02-21 8:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 18:10 [PATCH] perf: add OMAP support for the new power events jean.pihet
2011-02-18 18:21 ` Santosh Shilimkar
2011-02-19 18:55 ` Santosh Shilimkar
2011-02-21 8:44 ` Jean Pihet
2011-02-21 8:53 ` Santosh Shilimkar [this message]
2011-02-28 16:33 ` Jean Pihet
2011-03-03 0:43 ` Kevin Hilman
2011-03-03 10:25 ` Jean Pihet
2011-03-10 0:08 ` Kevin Hilman
2011-03-10 8:09 ` Jean Pihet
2011-03-10 18:15 ` Kevin Hilman
2011-03-10 1:04 ` Paul Walmsley
2011-03-10 8:17 ` Jean Pihet
-- strict thread matches above, loose matches on Subject: below --
2011-01-24 14:20 jean.pihet
2011-01-24 14:55 ` Santosh Shilimkar
2011-01-26 9:49 ` Jean Pihet
2011-01-26 10:06 ` Santosh Shilimkar
2011-02-07 16:05 ` Jean Pihet
2011-02-07 16:12 ` Santosh Shilimkar
2011-02-10 21:02 ` Kevin Hilman
2011-02-18 18:14 ` Jean Pihet
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=5dad46ab75a15145f907aeca53f769c1@mail.gmail.com \
--to=santosh.shilimkar@ti.com \
--cc=j-pihet@ti.com \
--cc=jean.pihet@newoldbits.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=trenn@suse.de \
/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).