All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>,
	hpa@zytor.com, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] x86: fdiv bug detection fix
Date: Thu, 31 Jul 2008 15:04:25 -0700	[thread overview]
Message-ID: <489236E9.6060804@goop.org> (raw)
In-Reply-To: <20080731144920.0016e02d.akpm@linux-foundation.org>

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

  reply	other threads:[~2008-07-31 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31 21:43 [PATCH] x86: fdiv bug detection fix Krzysztof Helt
2008-07-31 21:49 ` Andrew Morton
2008-07-31 22:04   ` Jeremy Fitzhardinge [this message]
2008-07-31 22:11   ` Willy Tarreau
2008-07-31 21:57 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=489236E9.6060804@goop.org \
    --to=jeremy@goop.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=krzysztof.h1@wp.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.