]> www.infradead.org Git - users/jedix/linux-maple.git/commit
um: stop using PCI port I/O
authorArnd Bergmann <arnd@arndb.de>
Fri, 9 May 2025 08:40:52 +0000 (10:40 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 2 Jun 2025 09:22:09 +0000 (11:22 +0200)
commitb8c9c3b822fe8e033b9802516f6466099d915488
treee1a054a6786cbc47bf4354d781d8425b5a703016
parente619e18ed462bded8e8f12672a37053d39451404
um: stop using PCI port I/O

arch/um is one of the last users of CONFIG_GENERIC_IOMAP, but upon
closer look it appears that the PCI host bridge does not register
any port I/O, and the absense of both custom inb/outb functions and
a PCI_IOBASE constant means that actually trying to use port I/O
results on a NULL pointer access.

Build testing with clang confirms this by warning about this exact
problem:

include/asm-generic/io.h:549:31: error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
  549 |         val = __raw_readb(PCI_IOBASE + addr);
      |                           ~~~~~~~~~~ ^

Remove all the Kconfig selects that refer to legacy port I/O
and instead just build the normal MMIO path that is emulated
by the virtio PCI host.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20250509084125.1488601-1-arnd@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/Kconfig
arch/um/kernel/Makefile
arch/um/kernel/ioport.c [deleted file]