[PATCH 1/3] ARM: CSR: Adding CSR SiRFprimaII board support

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Jul 6 16:50:59 EDT 2011


On Wed, Jul 06, 2011 at 10:31:50PM +0200, Arnd Bergmann wrote:
> Just as a follow-up, this is what I was referring to in the other
> sub-thread. Setting NO_IOPORT and removing __io does work for a lot
> of things today, but breaks randconfig builds left and right. I want
> to clean that up by adding 'depends on HAS_IOPORT' at the correct places
> and then switch all platforms that don't need it to remove __io.

It's not that easy.  NO_IOPORT was brought in by Viro to work around
various platforms which broke - such as RiscPC.  Viro was well aware
of that platform, and we had a discussion about it.

The conclusion (I think) was that NO_IOPORT was to prevent ioport_map()
et.al. on platforms which couldn't provide a sane definition - eg:

(11 Feb 2007)...
19:50 < rmk> inb(port) | inb(port + 1) << 8 is not identical to addr = ioport_map(port); readb(addr) | readb(addr + 1)
19:51 < rmk> inb(port) | inb(port + 1) << 8 _is_ identical to addr = ioport_map(port); readb(addr) | readb(addr + (1 << 2))
19:53 < rmk> inw(port) | inw(port + 2) equates to addr = ioport_map(port); readw(addr) | readw(addr + (2 << 2))

So, while the above referred to platform uses inb etc, it sets
NO_IOPORT to stop the devres breakage, which in turn disables
HAS_IOPORT.

So, HAS_IOPORT does not mean the ISA/PCI accessors are not provided.
It means there will be no devres support for it and ioport_map() is
probably missing.

I've added Viro to this thread in case he'd like to correct me (if he
remembers the background to HAS_IOPORT/NO_IOPORT etc.)



More information about the linux-arm-kernel mailing list