]> www.infradead.org Git - users/jedix/linux-maple.git/commit
asm-generic/io.h: rework split ioread64/iowrite64 helpers
authorArnd Bergmann <arnd@arndb.de>
Mon, 3 Feb 2025 14:07:30 +0000 (15:07 +0100)
committerArnd Bergmann <arnd@arndb.de>
Sat, 1 Mar 2025 20:00:22 +0000 (21:00 +0100)
commitdc90c890363d3e4b0ec73cd21b5be592692723fd
tree6d88c326bd0ffb3a8bf9507bf41c671c4bca204b
parent2014c95afecee3e76ca4a56956a936e23283f05b
asm-generic/io.h: rework split ioread64/iowrite64 helpers

There are two incompatible sets of definitions of these eight functions:
On 64-bit architectures setting CONFIG_HAS_IOPORT, they turn into
either pair of 32-bit PIO (inl/outl) accesses or a single 64-bit MMIO
(readq/writeq). On other 64-bit architectures, they are always split
into 32-bit accesses.

Depending on which header gets included in a driver, there are
additionally definitions for ioread64()/iowrite64() that are
expected to produce a 64-bit register MMIO access on all 64-bit
architectures.

To separate the conflicting definitions, make the version in
include/linux/io-64-nonatomic-*.h visible on all architectures
but pick the one from lib/iomap.c on architectures that set
CONFIG_GENERIC_IOMAP in place of the default fallback.

Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
include/asm-generic/iomap.h
include/linux/io-64-nonatomic-hi-lo.h
include/linux/io-64-nonatomic-lo-hi.h
lib/iomap.c