Re: [PATCH] fix Intel RNG detection

From: Jan Beulich
Date: Thu Jul 27 2006 - 11:13:07 EST

>> +#ifdef CONFIG_SMP
>> +static volatile char __initdata waitflag;
>I don't think we want to add yet another use of volatile
>(see the kernel archives for why).
>Use memory barriers instead, please.

I can certainly do that.

>> +#define waitflag err
>That's really confusing magic.

Any better idea? I just wanted to prevent adding another #ifdef CONFIG_SMP, and since it doesn't matter where the write
goes for UP, doing it that way seemed the simplest solution.

>> + writeb(0xff, mem);
>> + writeb(0x90, mem);
>> + mfg = readb(mem + 0);
>> + dvc = readb(mem + 1);
>> + writeb(0xff, mem);
>Do these magic registers have names? Possible to use #defines for it?

While one could certainly make up names for them (the documentation of the functionality used here isn't the best I've
seen), I generally dislike creating defines when their values are used just in a single place *and* when their naming
can at best be artificial (i.e. doesn't serve documentation purposes). But if you and/or Jeff insist, I can certainly do
a change like that.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at