Messages in this thread | | | Date | Thu, 31 Jul 2008 15:04:25 -0700 | From | Jeremy Fitzhardinge <> | Subject | Re: [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
| |