]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools headers: Import asm-generic MMIO helpers
authorDavid Matlack <dmatlack@google.com>
Fri, 22 Aug 2025 21:25:02 +0000 (21:25 +0000)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 27 Aug 2025 18:14:06 +0000 (12:14 -0600)
commit1f9c8edd6a7e9b0fd914cfeef8ce075307e8e702
tree8ef82dfda5e480ca64901bbca533cf76533a04e2
parent9bf9b185e3ce76c9fddb4c6edb0ec3334b7649df
tools headers: Import asm-generic MMIO helpers

Import the asm-generic MMIO helper functions from the kernel headers
into tools/include/. The top-level include is <linux/io.h> which then
includes the arch-specific <asm/io.h>, which then includes
<asm-generic/io.h>. This layout is chosen to match the kernel header
layout and to appease checkpatch.pl (which warns against including
<asm/io.h> or <asm-generic/io.h> directly).

Changes made when importing:

 - Add missing includes at the top.
 - Stub out mmiowb_set_pending().
 - Stub out _THIS_IP_.
 - Stub out log_*_mmio() calls.
 - Drop the CONFIG_64BIT checks, since tools/include/linux/types.h
   always defines u64.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20250822212518.4156428-16-dmatlack@google.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
tools/include/asm-generic/io.h [new file with mode: 0644]
tools/include/asm/io.h [new file with mode: 0644]
tools/include/linux/io.h