cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.de>,
	cpufreq list <cpufreq@www.linux.org.uk>
Subject: Re: my dothan didn't work with cpufreq...
Date: Mon, 2 Aug 2004 21:29:00 +0100	[thread overview]
Message-ID: <20040802202900.GB12724@redhat.com> (raw)
In-Reply-To: <1091477873.18905.1.camel@localhost>

On Mon, Aug 02, 2004 at 01:17:53PM -0700, Jeremy Fitzhardinge wrote:
 > On Mon, 2004-08-02 at 20:26 +0100, Dave Jones wrote:
 > > I merged this, but something occurred to me whilst eyeballing
 > > the diffs.  Rather than duplicating X86_VENDOR_INTEL in every
 > > entry of the struct, how about we check it in one place?
 > > 
 > > I'm unaware of any vendor planning to duplicate speedstep,
 > > but even if AMD/VIA threw away their current implementations
 > > in favour of a bit-for-bit compatible implementation, it
 > > wouldn't be hard to add an extra if()
 > 
 > I had the same thought.  I already added the vendor check at the top of
 > the init function, so in theory nothing else should need to look at it.
 > 
 > So, we can just drop the vendor entries in those tables without having
 > to do anything else.

Groovy. I just nuked it in my tree with this patch.
It'll go to Linus with the next batch

If some vendor does clone speedstep, I think it'd be better
done without having to dupe the vendor ID in every entry,
by having per-vendor tables.

		Dave

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/02 21:27:47+01:00 davej@redhat.com 
#   [CPUFREQ] speedstep-centrino: Remove unnecessary vendor checks.
#   
#   This is only used on Intel, and if some other vendor ever clones speedstep,
#   we can add an additional check in the init routine.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
# arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
#   2004/08/02 21:27:39+01:00 davej@redhat.com +3 -5
#   [CPUFREQ] speedstep-centrino: Remove unnecessary vendor checks.
#   
#   This is only used on Intel, and if some other vendor ever clones speedstep,
#   we can add an additional check in the init routine.
#   
#   Signed-off-by: Dave Jones <davej@redhat.com>
# 
diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2004-08-02 21:28:42 +01:00
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c	2004-08-02 21:28:42 +01:00
@@ -40,7 +40,6 @@
 
 struct cpu_id
 {
-	__u8	x86_vendor;     /* CPU vendor */
 	__u8	x86;            /* CPU family */
 	__u8	x86_model;	/* model */
 	__u8	x86_mask;	/* stepping */
@@ -53,9 +52,9 @@
 };
 
 static const struct cpu_id cpu_ids[] = {
-	[CPU_BANIAS]	= { X86_VENDOR_INTEL,	6,  9, 5 },
-	[CPU_DOTHAN_A1]	= { X86_VENDOR_INTEL,	6, 13, 1 },
-	[CPU_DOTHAN_B0]	= { X86_VENDOR_INTEL,	6, 13, 6 },
+	[CPU_BANIAS]	= { 6,  9, 5 },
+	[CPU_DOTHAN_A1]	= { 6, 13, 1 },
+	[CPU_DOTHAN_B0]	= { 6, 13, 6 },
 };
 #define N_IDS	(sizeof(cpu_ids)/sizeof(cpu_ids[0]))
 
@@ -265,7 +264,6 @@
 static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c, const struct cpu_id *x)
 {
 	if ((c->x86 == x->x86) &&
-	    (c->x86_vendor == x->x86_vendor) &&
 	    (c->x86_model == x->x86_model) &&
 	    (c->x86_mask == x->x86_mask))
 		return 1;

      reply	other threads:[~2004-08-02 20:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-12 20:54 my dothan didn't work with cpufreq Damien Marchal
2004-07-13  9:49 ` Dominik Brodowski
2004-07-14 10:50   ` Damien Marchal
2004-07-16  8:19     ` Dominik Brodowski
2004-07-22  1:55   ` Jeremy Fitzhardinge
2004-07-22  6:04     ` Dominik Brodowski
2004-07-22  6:56       ` Jeremy Fitzhardinge
2004-07-22  9:31         ` Dominik Brodowski
2004-07-22 17:34           ` Jeremy Fitzhardinge
2004-07-23 19:38             ` Dominik Brodowski
2004-07-24  1:27               ` Jeremy Fitzhardinge
2004-07-24  7:06                 ` Dominik Brodowski
2004-08-02 19:26                 ` Dave Jones
2004-08-02 20:17                   ` Jeremy Fitzhardinge
2004-08-02 20:29                     ` Dave Jones [this message]

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=20040802202900.GB12724@redhat.com \
    --to=davej@redhat.com \
    --cc=cpufreq@www.linux.org.uk \
    --cc=jeremy@goop.org \
    --cc=linux@dominikbrodowski.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