All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, trenn@suse.de,
	kay.sievers@vrf.org, Andi Kleen <ak@linux.intel.com>,
	kay.sievers@vrfy.org
Subject: Re: [PATCH 08/10] cpufreq: Add support for x86 cpuinfo auto loading
Date: Mon, 19 Dec 2011 18:03:42 -0500	[thread overview]
Message-ID: <20111219230341.GA570@redhat.com> (raw)
In-Reply-To: <1324334865-30459-9-git-send-email-andi@firstfloor.org>

On Mon, Dec 19, 2011 at 02:47:44PM -0800, Andi Kleen wrote:

 > diff --git a/drivers/cpufreq/gx-suspmod.c b/drivers/cpufreq/gx-suspmod.c
 > index ffe1f2c..05d0f7f 100644
 > --- a/drivers/cpufreq/gx-suspmod.c
 > +++ b/drivers/cpufreq/gx-suspmod.c
 > @@ -82,6 +82,7 @@
 >  #include <linux/errno.h>
 >  #include <linux/slab.h>
 >  
 > +#include <asm/cpu_device_id.h>
 >  #include <asm/processor-cyrix.h>
 >  
 >  /* PCI config registers, all at F0 */
 > @@ -171,12 +172,20 @@ static struct pci_device_id gx_chipset_tbl[] __initdata = {
 >  	{ PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5510), },
 >  	{ 0, },
 >  };
 > +/* MODULE_DEVICE_TABLE here too? But the CPU should be enough. */
 >  
 >  static void gx_write_byte(int reg, int value)
 >  {
 >  	pci_write_config_byte(gx_params->cs55x0, reg, value);
 >  }
 >  
 > +static const struct x86_cpu_id gx_ids[] = {
 > +	{ X86_VENDOR_NSC, },
 > +	{ X86_VENDOR_CYRIX },
 > +	{}
 > +};
 > +MODULE_DEVICE_TABLE(x86cpu, gx_ids);
 > +
 >  /**
 >   * gx_detect_chipset:
 >   *
 > @@ -185,12 +194,8 @@ static __init struct pci_dev *gx_detect_chipset(void)
 >  {
 >  	struct pci_dev *gx_pci = NULL;
 >  
 > -	/* check if CPU is a MediaGX or a Geode. */
 > -	if ((boot_cpu_data.x86_vendor != X86_VENDOR_NSC) &&
 > -	    (boot_cpu_data.x86_vendor != X86_VENDOR_CYRIX)) {
 > -		pr_debug("error: no MediaGX/Geode processor found!\n");
 > +	if (!x86_match_cpu(gx_ids))
 >  		return NULL;
 > -	}
 >  
 >  	/* detect which companion chip is used */
 >  	for_each_pci_dev(gx_pci) {

Looking closer at this one, I think we could possibly just autoload based on the PCI IDs
in gx_chipset_tbl, and remove the cpu vendor checking entirely.
Pretty sure those Cyrix PCI devices won't show up anywhere else.

Otherwise, we could narrow the range this gets loaded on to Cyrix Fam 4 model 5, and
NatSemi Fam 5, model 4.  (afaik, that covers all the possible cpus this driver works on)

	Dave


  reply	other threads:[~2011-12-19 23:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 22:47 Updated cpuid-match patchkit v2 Andi Kleen
2011-12-19 22:47 ` [PATCH 02/10] Add driver auto probing for x86 features Andi Kleen
2011-12-19 22:47 ` [PATCH 02/10] Add driver auto probing for x86 features v2 Andi Kleen
2011-12-19 22:47 ` [PATCH 03/10] crypto: Add support for x86 cpuid auto loading for x86 crypto drivers Andi Kleen
2011-12-19 23:22   ` Dave Jones
2011-12-19 23:25     ` H. Peter Anvin
2011-12-19 23:32       ` Dave Jones
2011-12-20  4:08       ` Andi Kleen
2011-12-20  4:54         ` H. Peter Anvin
2011-12-20  5:30           ` Herbert Xu
2011-12-20  5:35             ` H. Peter Anvin
2011-12-20  5:38               ` Herbert Xu
2011-12-20  6:48                 ` H. Peter Anvin
2011-12-19 22:47 ` [PATCH 04/10] intel-idle: convert to x86_cpu_id auto probing Andi Kleen
2011-12-19 22:47 ` [PATCH 05/10] ACPI: Load acpi-cpufreq from processor driver automatically Andi Kleen
2011-12-19 22:47 ` [PATCH 06/10] HWMON: Convert via-cputemp to x86 cpuid autoprobing Andi Kleen
2011-12-19 22:47 ` [PATCH 07/10] HWMON: Convert coretemp " Andi Kleen
2011-12-19 22:47 ` [PATCH 08/10] cpufreq: Add support for x86 cpuinfo auto loading Andi Kleen
2011-12-19 23:03   ` Dave Jones [this message]
2011-12-19 23:12     ` Andi Kleen
2011-12-19 23:16       ` H. Peter Anvin
2011-12-19 22:47 ` [PATCH 09/10] x86: autoload microcode driver on Intel and AMD systems Andi Kleen

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=20111219230341.GA570@redhat.com \
    --to=davej@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=kay.sievers@vrf.org \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@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 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.