lkml.org 
[lkml]   [2008]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: fdiv bug detection fix
Andrew Morton wrote:
>> "fwait\n\t"
>> "fninit"
>> - : "=m" (*&boot_cpu_data.fdiv_bug)
>> + : "=m" (*&fdiv_bug)
>> : "m" (*&x), "m" (*&y));
>>

This (*&foo) construct is strange. Just "m" (foo) should be enough.

>> +
>> + boot_cpu_data.fdiv_bug = fdiv_bug;
>> if (boot_cpu_data.fdiv_bug)
>> printk("Hmm, FPU with FDIV bug.\n");
>> }
>>
>
> hm, the code seems to have been that way for quite some time. I wonder
> why nobody noticed this before.
>

It would trash f00f_bug, coma_bug and some padding. You'd have to be
running a Cyrix or Intel chip dating from somewhere around 1997-1998 to
even be subject to those bugs, and even if you were, they wouldn't hurt
day to day. And if it snoops for those bugs after the fdiv bug, then
they'd get updated properly anyway.

Change looks correct.

J


\
 
 \ /
  Last update: 2008-08-01 00:07    [W:0.032 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site