Re: [patch 3/3] add Via Nehemiah ("xstore") rng support

From: Dave Jones (davej@codemonkey.org.uk)
Date: Wed Mar 12 2003 - 07:55:47 EST


On Tue, Mar 11, 2003 at 10:27:05PM -0500, Jeff Garzik wrote:

> Review from x86 experts is especially appreciated here, as I am from an
> x86 expert myself.

only minor niggles.

> diff -Nru a/drivers/char/Kconfig b/drivers/char/Kconfig
> --- a/drivers/char/Kconfig Tue Mar 11 21:37:50 2003
> +++ b/drivers/char/Kconfig Tue Mar 11 21:37:50 2003
> @@ -710,7 +710,7 @@
> If you're not sure, say N.
>
> config HW_RANDOM
> - tristate "Intel/AMD H/W Random Number Generator support"
> + tristate "Intel/AMD/Via H/W Random Number Generator support"

s/Via/VIA/

> diff -Nru a/drivers/char/hw_random.c b/drivers/char/hw_random.c
> --- a/drivers/char/hw_random.c Tue Mar 11 21:37:50 2003
> +++ b/drivers/char/hw_random.c Tue Mar 11 21:37:50 2003
> @@ -1,5 +1,5 @@
> /*
> - Hardware driver for the Intel/AMD Random Number Generators (RNG)
> + Hardware driver for the Intel/AMD/Via Random Number Generators (RNG)

Ditto

> + rdmsr(MSR_VIA_RNG, lo, hi);
> + if ((lo & VIA_RNG_ENABLE) == 0) {
> + printk(KERN_ERR PFX "cannot enable Via C3 RNG, aborting\n");

Ditto.

 
> +#define cpu_has_xstore boot_cpu_has(X86_FEATURE_XSTORE)
 
Do we want to do this check only on VIA CPUs I wonder.
As a vendor specific extension, I'd be inclined to do that.

Niggles aside, looks good! Can't test it though, as my current
Nehemiah is pre-production, and seems to have a broken RNG.

                Dave

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



This archive was generated by hypermail 2b29 : Sat Mar 15 2003 - 22:00:30 EST