Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753874AbXLGQKp (ORCPT ); Fri, 7 Dec 2007 11:10:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751928AbXLGQKh (ORCPT ); Fri, 7 Dec 2007 11:10:37 -0500 Received: from [81.2.110.250] ([81.2.110.250]:51731 "EHLO the-village.bc.nu" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751883AbXLGQKg (ORCPT ); Fri, 7 Dec 2007 11:10:36 -0500 Date: Fri, 7 Dec 2007 16:04:39 +0000 From: Alan Cox To: Andi Kleen Cc: "David P. Reed" , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Subject: Re: RFC: outb 0x80 in inb_p, outb_p harmful on some modern AMD64 with MCP51 laptops Message-ID: <20071207160439.71b7f46a@the-village.bc.nu> In-Reply-To: References: <475879CD.9080006@reed.com> X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.14; i386-redhat-linux-gnu) Organization: Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 934 Lines: 21 > modern CPU compared to the bus. But the delay really needs to be something > that is about IO port speed. Ok in theory you could try to measure > a outb using RDTSC and then use udelay, but first you would need You don't need to. Port 0x80 historically is about 8uS so just udelay(8) and make sure the initial default delay is conservative enough before the CPU speed is computed. 0x80 should be fine for anything PC compatible anyway, its specifically reserved as a debug port and supported for *exactly* that purpose by many chipsets. The afflicted laptop should really be taken up with the vendor. If its got port 0x80 wrong gods knows what else it might have problems with. Alan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/