Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755295AbXLKBnS (ORCPT ); Mon, 10 Dec 2007 20:43:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751304AbXLKBnI (ORCPT ); Mon, 10 Dec 2007 20:43:08 -0500 Received: from hawking.rebel.net.au ([203.20.69.83]:37073 "EHLO hawking.rebel.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752033AbXLKBnH convert rfc822-to-8bit (ORCPT ); Mon, 10 Dec 2007 20:43:07 -0500 Message-ID: <475DEB23.1000304@davidnewall.com> Date: Tue, 11 Dec 2007 12:12:59 +1030 From: David Newall User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070221 SeaMonkey/1.1.1 MIME-Version: 1.0 To: "H. Peter Anvin" CC: Krzysztof Halasa , Rene Herman , Pavel Machek , Andi Kleen , Alan Cox , "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 References: <475879CD.9080006@reed.com> <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> In-Reply-To: <475DE6F4.80702@zytor.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1278 Lines: 26 H. Peter Anvin wrote: > David Newall wrote: >> Where did the 8us delay come from? The documentation and source is >> careful not to say how long the delay is. Would changing it to, say >> 1us, be technically wrong? Is code that requires 8us correct? > > I think a single ISA bus transaction is 1 ?s, so two of them back to > back should be 2 ?s, not 8 ?s... Exactly. You think it's 2us, but the documentation doesn't say. The _p functions are generic inasmuch as they provide an unspecified delay. Drivers which work across platforms, and which use _p, therefore have different delays on different platforms. Should the length of the delay be unimportant? I wouldn't have thought so. If it is important, does that mean that such drivers are buggy on some platforms? I really *hate* the idea that access to non-present hardware is used to generate a delay. That sucks so badly. It's worthy of a school-aged hacker, not of a world-leading operating system. It's so not best-practice that it's worst-practice. -- 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/