On Sun, Sep 19, 2021 at 3:44 PM Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > The fix seems to be to just move that odd code from the header file to > lib/pci_iomap.c, and that should make it all JustWork(tm). I'm not 100% happy about the end result, and in particular I think that the new generic pci_iounmap() function for the ARCH_WANTS_GENERIC_PCI_IOUNMAP case should do the "iounmap(p)" thing even if ARCH_HAS_GENERIC_IOPORT_MAP wasn't true, but I tried to keep the old rules, even if they seemed broken. arm and arm64 build for me, as did sparc64 and alpha. At least in the configs I tested. And the code _does_ make a bit more sense than it used to. It still has crazy corners, but moving the pci_iounmap() code out of the header file should make it easier to fix up in the future. Linus