[PATCH 13/15] ARM: make mach/io.h include optional
arnd at arndb.de
Tue Feb 14 13:12:38 EST 2012
On Tuesday 14 February 2012, Russell King - ARM Linux wrote:
> > Yes, at least in the long run. Note that this should make no difference
> > at all from a performance point of view, but it does impact code size a bit.
> That depends whether the additional reloads of pci_io_base can be properly
> scheduled by the compiler, and experience shows that you tend to end up
> with the load delay slot not being filled on older processors.
> Not only that, but the compiler will evaluate the entire:
> pci_io_base + (addr & IO_SPACE_LIMIT)
> thing every time. With a 64K mask, that will include reloading the
> mask every single access.
> So, we'll probably end up with about three additional loads per IO
> operation, none of which would be scheduled particularly well.
> "Yuck" and "not in my kernel" comes to mind.
I totally agree with the code size point, but my point above was that
from performance perspective all that you mentioned should be dwarfed
by the overhead of actually doing a synchronous operation on an
external bus. writel may be reasonably fast on a CPU internal bus,
but inb/outb implies a full bus synchronization and is only
used on older PCI hardware, typically those that date back to
ISA in some form.
More information about the linux-arm-kernel