The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: dougthompson@xmission.com
Cc: dougthompson@xmission.com, alan@lxorguk.ukuu.org.uk,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>, Andi Kleen <ak@suse.de>
Subject: Re: [PATCH 3/3] EDAC Add e752x parameter for sysbus_parity selection
Date: Fri, 21 Mar 2008 14:35:24 -0700	[thread overview]
Message-ID: <20080321143524.318d002a.akpm@linux-foundation.org> (raw)
In-Reply-To: <47e17ddf.xF+lLzMkHllCZjZq%dougthompson@xmission.com>

On Wed, 19 Mar 2008 14:55:59 -0600
dougthompson@xmission.com wrote:

> +/* Setup system bus parity mask register.
> + * Sysbus parity supported on:
> + *   e7320/e7520/e7525 + Xeon
> + *   i3100 + Xeon/Celeron
> + * Sysbus parity not supported on:
> + *   i3100 + Pentium M/Celeron M/Core Duo/Core2 Duo
> + */
> +static void e752x_init_sysbus_parity_mask(struct e752x_pvt *pvt)
> +{
> +	char *cpu_id = cpu_data(0).x86_model_id;
> +	struct pci_dev *dev = pvt->dev_d0f1;
> +	int enable = 1;
> +
> +	/* Allow module paramter override, else see if CPU supports parity */
> +	if (sysbus_parity != -1) {
> +		enable = sysbus_parity;
> +	} else if (cpu_id[0] &&
> +		   ((strstr(cpu_id, "Pentium") && strstr(cpu_id, " M ")) ||
> +		    (strstr(cpu_id, "Celeron") && strstr(cpu_id, " M ")) ||
> +		    (strstr(cpu_id, "Core") && strstr(cpu_id, "Duo")))) {
> +		e752x_printk(KERN_INFO, "System Bus Parity not "
> +			     "supported by CPU, disabling\n");
> +		enable = 0;
> +	}
> +
> +	if (enable)
> +		pci_write_config_word(dev, E752X_SYSBUS_ERRMASK, 0x0000);
> +	else
> +		pci_write_config_word(dev, E752X_SYSBUS_ERRMASK, 0x0309);
> +}

Is that the best way of working out whether the CPU supports system bus
parity?  We do have cpu capability infrastructure in x86 core and I'd have
though it would be better for x86 core to work this out, set the suitable
flag and have clients (ie: EDAC) test that flag?


  reply	other threads:[~2008-03-21 21:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 20:55 [PATCH 3/3] EDAC Add e752x parameter for sysbus_parity selection dougthompson
2008-03-21 21:35 ` Andrew Morton [this message]
2008-03-21 21:48   ` Doug Thompson
2008-03-21 22:56     ` Peter Tyser

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=20080321143524.318d002a.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ak@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dougthompson@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.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