From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Dirk Brandewie <dirk.brandewie@gmail.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
linaro-kernel@lists.linaro.org, patches@linaro.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, nm@ti.com, ceh@ti.com
Subject: Re: [PATCH V4 1/2] cpufreq: Mark x86 drivers with CPUFREQ_SKIP_INITIAL_FREQ_CHECK flag
Date: Mon, 02 Dec 2013 23:33:04 +0100 [thread overview]
Message-ID: <2171422.pY15ZQme4E@vostro.rjw.lan> (raw)
In-Reply-To: <529CA5D5.9010008@gmail.com>
On Monday, December 02, 2013 07:23:01 AM Dirk Brandewie wrote:
> Sorry for late response to these threads. Holiday weekend in the US.
>
> On 11/29/2013 06:14 AM, Viresh Kumar wrote:
> > On some systems we can't really say what frequency we're running at the moment
> > and so for these we shouldn't check if we are running at a frequency present in
> > frequency table. For now mark all x86 drivers with this flag:
> > CPUFREQ_SKIP_INITIAL_FREQ_CHECK.
> >
> > This patch also defines this macro. It will be used in cpufreq.c in the next
> > patch.
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> > V3->V4:
> > - Reversed the order of patches
> > - Moved definition of CPUFREQ_SKIP_INITIAL_FREQ_CHECK to patch 1/2 instead of
> > 2/2.
> >
> > drivers/cpufreq/acpi-cpufreq.c | 1 +
> > drivers/cpufreq/cpufreq-nforce2.c | 1 +
> > drivers/cpufreq/e_powersaver.c | 1 +
> > drivers/cpufreq/elanfreq.c | 1 +
> > drivers/cpufreq/gx-suspmod.c | 1 +
> > drivers/cpufreq/ia64-acpi-cpufreq.c | 1 +
> > drivers/cpufreq/intel_pstate.c | 2 +-
>
> NAK for intel_pstate. The code that will use this flag also uses has_target()
> which is false for intel_pstate.
Is your point that intel_pstate doesn't need to have this flag set?
> I think the logic for this patch is inverted. Why are we adding a flag to
> drivers where the bug cannot exist?
Well, enumerating goodness usually is a more sustainable strategy than
enumerationg badness, especially if the latter is more abundant. :-)
> I would be happier if the flag was
> CPUFREQ_NEED_INITIAL_FREQ_WORKAROUND to mark the platforms where the bug may
> exist let those platforms cary the flag for the next 10+ years.
>
> I still believe that this bug should be dealt with in platform specific code
> since this is working around a bootloader bug. Are there platforms in the wild
> that even need this code or is this to support early platform bringup?
All it takes to introduce it is to use a buggy bootloader, so I guess
there's a number of potentially affected platforms out there.
This really isn't about which individual platforms have the problem, but about
which platforms have the property that the clock *can* be set to a wrong
frequency initially. These are the ones we need to worry about regardless,
because we can't control boot loaders and duplicating the same code in
a number of drivers doesn't sound like a good approach.
So the only reasonable way forward I can see is to flag either the platforms
that we need to worry about, or the platforms that we don't need to worry
about and use that to decide whether or not to do the check.
Thanks,
Rafael
next prev parent reply other threads:[~2013-12-02 22:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 14:14 Viresh Kumar
2013-11-29 14:14 ` [PATCH V4 2/2] cpufreq: Make sure CPU is running on a freq from freq-table Viresh Kumar
2013-12-02 15:23 ` [PATCH V4 1/2] cpufreq: Mark x86 drivers with CPUFREQ_SKIP_INITIAL_FREQ_CHECK flag Dirk Brandewie
2013-12-02 22:33 ` Rafael J. Wysocki [this message]
2013-12-03 5:48 ` Viresh Kumar
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=2171422.pY15ZQme4E@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=ceh@ti.com \
--cc=cpufreq@vger.kernel.org \
--cc=dirk.brandewie@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=patches@linaro.org \
--cc=viresh.kumar@linaro.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
all inboxes | Powered by JetHome®