[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071211135020.GB16750@one.firstfloor.org>
Date: Tue, 11 Dec 2007 14:50:20 +0100
From: Andi Kleen <andi@...stfloor.org>
To: Pavel Machek <pavel@....cz>
Cc: Andi Kleen <andi@...stfloor.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
David Newall <david@...idnewall.com>,
"H. Peter Anvin" <hpa@...or.com>, Krzysztof Halasa <khc@...waw.pl>,
Rene Herman <rene.herman@...access.nl>,
"David P. Reed" <dpreed@...d.com>, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern AMD64 with MCP51 laptops
On Tue, Dec 11, 2007 at 02:47:25PM +0100, Pavel Machek wrote:
> On Tue 2007-12-11 14:32:49, Andi Kleen wrote:
> > > The LPC bus behaviour is absolutely and precisely defined. The timing of
> > > the inb is defined in bus clocks which is perfect as the devices needing
> > > delay are running at a fraction of busclock usually busclock/2.
> > >
> > > Older processors did not have a high precision timer so you couldn't
> > > calibrate loop based delays for 1uS.
> >
> > For newer CPUs udelay() would be probably fine though. We seem
> > to have several documented examples now where the bus aborts
> > trigger hardware bugs, and it is always better to avoid such situations.
> >
> > I still think the best strategy would be to switch based on TSC
> > availability. Perhaps move out*_p out of line to avoid code bloat.
>
> Why is TSC significant? udelay() based on bogomips seems to be good
> enough...?
Maybe I'm not sure how accurate it really is on
non TSC system. On the other hand it is unclear that the port 80 IO
is always the same time so it's probably ok to vary a bit.
So most likely going to udelay() unconditionally is fine.
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists