Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Luis R. Rodriguez <mcgrof@...>
Cc: Alan Cox <alan@...>, linux-kernel <linux-kernel@...>, Jeff Garzik <jeff@...>, John W. Linville <linville@...>, linux-wireless <linux-wireless@...>
Date: Tuesday, September 18, 2007 - 3:03 pm

On Tue, 18 Sep 2007, Luis R. Rodriguez wrote:

Well, the thing is, I'm not at all sure that I agree with this.

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.

After all, you cannot use "inb/outb" on it, even if would happen to be an 
IO address.

So what is this usage that wants to use the bogus accessor? Why not fix 
that instead of adding documentation for something that is very arguably 
something we want to *avoid* having people do!

		Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Clarify pci_iomap() usage for MMIO-only devices, Luis R. Rodriguez, (Mon Sep 17, 4:22 pm)
Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices, Luis R. Rodriguez, (Tue Sep 18, 2:46 pm)
Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices, Linus Torvalds, (Tue Sep 18, 3:03 pm)
Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices, Nick Kossifidis, (Wed Sep 19, 11:07 am)
Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices, Benjamin Herrenschmidt, (Tue Sep 18, 6:16 pm)
Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices, Luis R. Rodriguez, (Tue Sep 18, 3:07 pm)
Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices, Benjamin Herrenschmidt, (Tue Sep 18, 6:20 pm)
Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices, Luis R. Rodriguez, (Tue Sep 18, 4:12 pm)
Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices, Benjamin Herrenschmidt, (Tue Sep 18, 6:21 pm)
Re: [PATCH] Clarify pci_iomap() usage for MMIO-only devices, Luis R. Rodriguez, (Tue Sep 18, 5:02 pm)