[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0709181515230.16478@woody.linux-foundation.org>
Date: Tue, 18 Sep 2007 15:25:42 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jeff Garzik <jeff@...zik.org>
cc: "Luis R. Rodriguez" <mcgrof@...il.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
linux-kernel <linux-kernel@...r.kernel.org>,
"John W. Linville" <linville@...driver.com>,
linux-wireless <linux-wireless@...r.kernel.org>
Subject: Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices
On Tue, 18 Sep 2007, Linus Torvalds wrote:
>
> I just think that proliferation of IO interfaces is a bad idea.
Side note: just allowing readl/writel on the iomap'ed pointers obviously
avoids that proliferation, but iomap really is architecture-specific, so
not only will different architectures act very differently, it's not
necessarily the case that iomap() will always have the same pointer as the
old ioremap(), even though the routines in the *default* implementation in
lib/iomap.c do that.
In fact, for IO port accesses, we already do some debugging to make sure
that people don't misuse the iomap() interfaces (ie the whole "Bad IO
access.." thing). I could well see the same thing happening for MMIO under
some debugging option, explicitly using some high bits in a 64-bit address
as a cookie - and that would make using regular readl/writel on the cookie
just fail spectacularly.
That said, it does seem unlikely (ie if we added a cookie for MMIO
pointers, we'd probably do it *both* for iomap and for ioremap(), and
readl/writel would continue to work). So in practice the readl/writel
probably works.
Linus
-
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