public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Matt Mackall <mpm@selenic.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lguest-fix-divide-error-implement-sched_clock
Date: Tue, 5 Jun 2007 18:37:22 +0200	[thread overview]
Message-ID: <200706051837.22847.ak@suse.de> (raw)
In-Reply-To: <46658C41.9090105@zytor.com>

On Tuesday 05 June 2007 18:16, H. Peter Anvin wrote:

> Yes.  Since there is now a mechanism to get a clean message out, it
> seemed like a good idea to extend the benefit of static determination.
> Andi already had in his tree -- and I copied it -- code to deal with
> stuff like "cpu_has_tsc" as a compile-time constant, eliminating the
> "else" clause.
>
> Depending on the configuration it affects FPU, TSC, 3Dnow.

I don't think it's a good idea for the TSC. There are various
setups where it is unreliable and also often simulators don't 
implement it correctly. And it's always a valuable workaround
to be able to turn it off.

Except possibly for the FPU only features used by the gcc output
should be tested this way. For everything else it is better to 
test at runtime.

That is x86-64 makes some more assumptions. But even it
doesn't assume TSC. 

I added the mechanism to statically evaluate mostly to share cpufeatures.h
between 32bit and 64bit at some point -- but didn't quite finish that work 
before the last merge.

-Andi

  reply	other threads:[~2007-06-05 16:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 22:38 lguest broken in 2.6.22-rc1-mm1 Matt Mackall
2007-05-22 23:27 ` Rusty Russell
2007-06-04 17:19   ` lguest rebroken in 2.6.22-rc3-mm1 Matt Mackall
2007-06-04 17:28     ` Andrew Morton
2007-06-04 17:46       ` Matt Mackall
2007-06-04 18:12       ` Andi Kleen
2007-06-05  2:48         ` Rusty Russell
2007-06-05 10:01           ` Andi Kleen
2007-06-05 13:11             ` [PATCH] lguest-fix-divide-error-implement-sched_clock Rusty Russell
2007-06-05 14:24               ` Andi Kleen
2007-06-05 16:07                 ` Andrew Morton
2007-06-05 16:16                   ` H. Peter Anvin
2007-06-05 16:37                     ` Andi Kleen [this message]
2007-06-05 17:02                       ` H. Peter Anvin
2007-06-05 18:43                       ` H. Peter Anvin
2007-06-05 18:51                         ` Andi Kleen
2007-06-05 21:15                       ` H. Peter Anvin
2007-06-05 21:31                         ` Andi Kleen

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=200706051837.22847.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=rusty@rustcorp.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox