lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080321143524.318d002a.akpm@linux-foundation.org>
Date:	Fri, 21 Mar 2008 14:35:24 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	dougthompson@...ssion.com
Cc:	dougthompson@...ssion.com, alan@...rguk.ukuu.org.uk,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>, Andi Kleen <ak@...e.de>
Subject: Re: [PATCH 3/3] EDAC Add e752x parameter for sysbus_parity
 selection

On Wed, 19 Mar 2008 14:55:59 -0600
dougthompson@...ssion.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?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ