Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: idxd: Allow registers.h to be included from tools/

Allow drivers/dma/idxd/registers.h to be included from userspace in
tools/ by adjusting the include path to uapi/linux/idxd.h if __KERNEL__
is not defined.

A subsequent commit will use registers.h to implement a userspace driver
for Intel DSA devices in tools/testing/selftests/vfio.

Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20250822212518.4156428-22-dmatlack@google.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

authored by

David Matlack and committed by
Alex Williamson
003e6faf 3fe30577

+4
+4
drivers/dma/idxd/registers.h
··· 3 3 #ifndef _IDXD_REGISTERS_H_ 4 4 #define _IDXD_REGISTERS_H_ 5 5 6 + #ifdef __KERNEL__ 6 7 #include <uapi/linux/idxd.h> 8 + #else 9 + #include <linux/idxd.h> 10 + #endif 7 11 8 12 /* PCI Config */ 9 13 #define PCI_DEVICE_ID_INTEL_DSA_GNRD 0x11fb