Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759266AbXIRWTW (ORCPT ); Tue, 18 Sep 2007 18:19:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756521AbXIRWTF (ORCPT ); Tue, 18 Sep 2007 18:19:05 -0400 Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:45223 "EHLO the-village.bc.nu" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754142AbXIRWTD (ORCPT ); Tue, 18 Sep 2007 18:19:03 -0400 Date: Tue, 18 Sep 2007 23:25:46 +0100 From: Alan Cox To: Linus Torvalds Cc: "Luis R. Rodriguez" , linux-kernel , Jeff Garzik , "John W. Linville" , linux-wireless Subject: Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices Message-ID: <20070918232546.004af9ff@the-village.bc.nu> In-Reply-To: References: <43e72e890709171322x76ab6b70xd29bf97e3643c553@mail.gmail.com> <20070918113401.6a8a737f@the-village.bc.nu> <43e72e890709181146s604e0f9fl8b0c16627469c77f@mail.gmail.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 X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 875 Lines: 16 > If you use ioport_map/unmap, then you really *should* access them with the > proper iomem accessors (ioread/iowrite). The fact that it may happen to > work (when using the default lib/iomap.c implementation, at least) on > some architectures and with the current implementation still doesn't mean > that you should necessarily use readb/writeb. Another reason we should enforce the use of ioread/iowrite is that some platforms do daft things like map mmio type devices through indirect register access. Sparc PCMCIA is a classic example. The only sane way to make these work is to require ioread/iowrite is used with iomap - 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/