From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753767AbXLKNdA (ORCPT ); Tue, 11 Dec 2007 08:33:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752081AbXLKNcw (ORCPT ); Tue, 11 Dec 2007 08:32:52 -0500 Received: from one.firstfloor.org ([213.235.205.2]:37629 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbXLKNcw (ORCPT ); Tue, 11 Dec 2007 08:32:52 -0500 Date: Tue, 11 Dec 2007 14:32:49 +0100 From: Andi Kleen To: Alan Cox Cc: David Newall , "H. Peter Anvin" , Krzysztof Halasa , Rene Herman , Pavel Machek , Andi Kleen , "David P. Reed" , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar Subject: Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern AMD64 with MCP51 laptops Message-ID: <20071211133249.GA16750@one.firstfloor.org> References: <20071207160439.71b7f46a@the-village.bc.nu> <20071209125458.GB4381@ucw.cz> <20071209165908.GA15910@one.firstfloor.org> <20071209212513.GC24284@elf.ucw.cz> <475CBDD7.5050602@keyaccess.nl> <475DE37F.20706@davidnewall.com> <475DE6F4.80702@zytor.com> <475DEB23.1000304@davidnewall.com> <20071211131413.1079be59@the-village.bc.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071211131413.1079be59@the-village.bc.nu> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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. -Andi