From: "Michael S. Zick" <lkml@morethan.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Harald Welte <HaraldWelte@viatech.com>,
Dave Jones <davej@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: TSC features, was: Re: [PATCH 1/2] CPUFREQ: Enable acpi-cpufreq driver for VIA/Centaur CPUs
Date: Mon, 15 Jun 2009 08:10:13 -0500 [thread overview]
Message-ID: <200906150810.15799.lkml@morethan.org> (raw)
In-Reply-To: <alpine.LFD.2.01.0906081128410.6847@localhost.localdomain>
On Mon June 8 2009, Linus Torvalds wrote:
>
> On Mon, 8 Jun 2009, Harald Welte wrote:
> >
> > The VIA/Centaur C7, C7-M and Nano CPU's all support ACPI based cpu p-states
> > using a MSR interface. The Linux driver just never made use of it, since in
> > addition to the check for the EST flag it also checked if the vendor is Intel.
> >
> > Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
> > ---
> > arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > index 208ecf6..ee03585 100644
> > --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > @@ -90,7 +90,8 @@ static int check_est_cpu(unsigned int cpuid)
> > {
> > struct cpuinfo_x86 *cpu = &cpu_data(cpuid);
> >
> > - if (cpu->x86_vendor != X86_VENDOR_INTEL ||
> > + if ((cpu->x86_vendor != X86_VENDOR_INTEL &&
> > + cpu->x86_vendor != X86_VENDOR_CENTAUR) ||
> > !cpu_has(cpu, X86_FEATURE_EST))
>
> Hmm. This all really should be just
>
> static int check_est_cpu(unsigned int cpuid)
> {
> struct cpuinfo_x86 *cpu = &cpu_data(cpuid);
> return cpu_has(cpu, X86_FEATURE_EST);
> }
>
> I suspect, with no vendor tests. That's the whole _point_ of CPU features,
> after all.
>
Following that same logic, shouldn't this chunk be based on CPU features also?
(Spotted while tracking down why the non-stop TSC wasn't being used on VIA):
#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
static void tsc_check_state(int state)
{
switch (boot_cpu_data.x86_vendor) {
case X86_VENDOR_AMD:
case X86_VENDOR_INTEL:
/*
* AMD Fam10h TSC will tick in all
* C/P/S0/S1 states when this bit is set.
*/
if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
return;
/*FALL THROUGH*/
default:
/* TSC could halt in idle, so notify users */
if (state > ACPI_STATE_C1)
mark_tsc_unstable("TSC halts in idle");
}
}
#else
static void tsc_check_state(int state) { return; }
#endif
Mike
next prev parent reply other threads:[~2009-06-15 13:10 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-03 4:06 Linux 2.6.30-rc8 Linus Torvalds
2009-06-04 13:56 ` Linux 2.6.30-rc8 [also: VIA Support] Michael S. Zick
2009-06-04 14:58 ` Michael S. Zick
2009-06-04 15:18 ` Linus Torvalds
2009-06-04 15:37 ` Michael S. Zick
2009-06-04 17:45 ` Harald Welte
2009-06-08 5:48 ` Pavel Machek
2009-06-04 16:00 ` Duane Griffin
2009-06-04 16:08 ` Michael S. Zick
2009-06-04 16:13 ` Linus Torvalds
2009-06-04 16:21 ` Michael S. Zick
2009-06-04 17:03 ` Linus Torvalds
2009-06-04 17:07 ` Linus Torvalds
2009-06-04 17:27 ` Michael S. Zick
2009-06-04 17:46 ` Linus Torvalds
2009-06-05 11:06 ` VIA PowerSaver (Re: Linux 2.6.30-rc8 [also: VIA Support]) Harald Welte
2009-06-05 13:41 ` Michael S. Zick
2009-06-06 12:17 ` Linux 2.6.30-rc8 [also: VIA Support] Michael S. Zick
2009-06-06 13:28 ` e_powersaver / underclocking (was Re: Linux 2.6.30-rc8 [also: VIA Support]) Harald Welte
2009-06-06 13:46 ` Michael S. Zick
2009-06-06 13:56 ` Michael S. Zick
2009-06-08 7:53 ` e_powersaver driver considered DANGEROUS " Harald Welte
2009-06-08 6:12 ` Pavel Machek
2009-06-08 10:27 ` [PATCH 1/2] CPUFREQ: Enable acpi-cpufreq driver for VIA/Centaur CPUs Harald Welte
2009-06-08 13:16 ` Matthew Garrett
2009-06-08 18:01 ` Harald Welte
2009-06-08 14:25 ` Michael S. Zick
2009-06-08 14:58 ` Matthew Garrett
2009-06-08 15:08 ` Michael S. Zick
2009-06-08 18:35 ` Linus Torvalds
2009-06-08 18:41 ` Michael S. Zick
2009-06-08 21:32 ` Michael S. Zick
2009-06-09 2:15 ` Harald Welte
2009-06-09 12:26 ` Michael S. Zick
2009-06-09 16:22 ` Chuck Ebbert
2009-06-09 16:45 ` Michael S. Zick
2009-06-15 13:10 ` Michael S. Zick [this message]
2009-06-15 14:25 ` [PATCH, RFC] Re: TSC features, Michael S. Zick
2009-06-08 20:03 ` [PATCH 1/2] CPUFREQ: Enable acpi-cpufreq driver for VIA/Centaur CPUs Michael S. Zick
2009-06-08 21:15 ` Michael S. Zick
2009-06-08 23:48 ` Matthew Garrett
2009-06-09 12:36 ` Michael S. Zick
2009-06-09 16:00 ` Michael S. Zick
2009-06-09 17:51 ` Michael S. Zick
2009-06-09 8:14 ` Linux 2.6.30-rc8 [also: VIA Support] Harald Welte
2009-06-04 17:55 ` Dave Jones
2009-06-05 7:27 ` Harald Welte
2009-06-05 7:41 ` Michael S. Zick
2009-06-05 7:19 ` Harald Welte
2009-06-05 7:27 ` Michael S. Zick
2009-06-05 10:39 ` Harald Welte
2009-06-05 13:18 ` Michael S. Zick
2009-06-08 5:56 ` Pavel Machek
2009-06-04 17:13 ` Michael S. Zick
2009-06-04 17:40 ` Harald Welte
2009-06-04 18:12 ` Michael S. Zick
2009-06-04 19:23 ` Michael S. Zick
2009-06-04 20:32 ` Michael S. Zick
2009-06-05 4:37 ` Michael S. Zick
2009-06-05 9:00 ` Michael S. Zick
2009-06-04 20:33 ` Dave Jones
2009-06-04 21:01 ` Michael S. Zick
2009-06-04 21:24 ` Dave Jones
2009-06-04 21:38 ` Michael S. Zick
2009-06-04 21:43 ` Dave Jones
2009-06-04 22:00 ` Michael S. Zick
2009-06-04 23:26 ` Michael S. Zick
2009-06-05 0:15 ` Dave Jones
2009-06-05 0:27 ` Michael S. Zick
2009-06-05 11:08 ` VIA CPU PCI cache line size (Re: Linux 2.6.30-rc8 [also: VIA Support]) Harald Welte
2009-06-05 13:43 ` Michael S. Zick
2009-06-04 20:16 ` Linux 2.6.30-rc8 [also: VIA Support] Andi Kleen
2009-06-04 20:29 ` Michael S. Zick
2009-06-05 0:33 ` Robert Hancock
2009-06-05 0:52 ` Michael S. Zick
2009-06-05 0:54 ` Robert Hancock
2009-06-05 7:30 ` Harald Welte
2009-06-04 17:08 ` Harald Welte
2009-06-04 17:18 ` Michael S. Zick
2009-06-05 7:24 ` Harald Welte
2009-06-05 7:44 ` Michael S. Zick
2009-06-05 7:52 ` Michael S. Zick
2009-06-04 20:39 ` Gerd Hoffmann
2009-06-05 18:47 ` Linux 2.6.30-rc8 Michael S. Zick
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=200906150810.15799.lkml@morethan.org \
--to=lkml@morethan.org \
--cc=HaraldWelte@viatech.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.