From: Romit Dasgupta <romit@ti.com>
To: Sergey Lapin <slapinid@gmail.com>
Cc: "khilman@deeprootsystems.com" <khilman@deeprootsystems.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] PM: Prevent direct cpufreq scaling during initialization
Date: Fri, 04 Dec 2009 16:17:35 +0530 [thread overview]
Message-ID: <4B18E8C7.9020707@ti.com> (raw)
In-Reply-To: <48239d390912030209n37f042fic8f3eb609e6371e7@mail.gmail.com>
Sergey Lapin wrote:
> On Thu, Dec 3, 2009 at 9:29 AM, Dasgupta, Romit <romit@ti.com> wrote:
>>
>>>> Signed-off-by: Romit Dasgupta <romit@ti.com>
>>>> ---
>>>> diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-
>>> omap.c
>>>> index 449b6b6..f94df20 100644
>>>> --- a/arch/arm/plat-omap/cpu-omap.c
>>>> +++ b/arch/arm/plat-omap/cpu-omap.c
>>>> @@ -149,8 +149,6 @@ static int __init omap_cpu_init(struct
>>> cpufreq_policy *policy)
>>>> VERY_HI_RATE) /
>>> 1000;
>>>> }
>>>>
>>>> - clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);
>>>> -
>>>> policy->min = policy->cpuinfo.min_freq;
>>>> policy->max = policy->cpuinfo.max_freq;
>>>> policy->cur = omap_getspeed(0);
>>> This patch leads to hang with current PM branch, SRF and CPU IDLE enabled
>>> on OMAP3525 rev C.
>> Verified this to work on Zoom2 + SRF + CPUidle. Can you give some debug info if possible?
>>
> Well, that looks like false alarm - I tried clean tree without local
> patches, and it seems to work.
>
> However, without this line removed, my system boots faster. Is it possible to
> limit initial speed for unstable setups, but to boot as fast as possible?
>
> Thanks a lot,
> S.
omap_cpufreq_init is a lateinitcall. So quite some part of the kernel startup
happens with whatever speed the bootloader passes control to kernel
initialization code. Only after we invoke omap_cpufreq_init will the cpufreq
framework try to call the offending code 'clk_set_rate'. Quite soon after this
the cpufreq default governor (whatever it is for your system, performance,
ondemand etc) is initialized. If you choose performance governor it will
immediately scale the frequency to the highest available for the system. So the
way to boot fast would be
a) make your bootcode scale the voltage + freq to support the highest cpu freq.
and/or
b) make performance governor the default.
next prev parent reply other threads:[~2009-12-04 10:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-02 10:12 [PATCH] PM: Prevent direct cpufreq scaling during initialization Romit Dasgupta
2009-12-02 15:33 ` Sergey Lapin
2009-12-03 6:29 ` Dasgupta, Romit
2009-12-03 10:09 ` Sergey Lapin
2009-12-04 10:47 ` Romit Dasgupta [this message]
2009-12-16 14:24 ` Kevin Hilman
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=4B18E8C7.9020707@ti.com \
--to=romit@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=slapinid@gmail.com \
/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