lkml.org 
[lkml]   [2006]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix Intel RNG detection
>> +#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.

Jan

Jan
-
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/

\
 
 \ /
  Last update: 2006-07-27 17:17    [W:0.057 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site