diff options
| author | David Matlack <dmatlack@google.com> | 2025-08-22 21:25:08 +0000 |
|---|---|---|
| committer | Alex Williamson <alex.williamson@redhat.com> | 2025-08-27 12:14:08 -0600 |
| commit | 003e6faf2c8ff1670c35622f11ff6211be563a9e (patch) | |
| tree | 95c7efc433326c937693a171f12ffddaf203c0a3 | |
| parent | 3fe305773bbeb2d946b9fb3c1224c8b00d6755ef (diff) | |
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>
| -rw-r--r-- | drivers/dma/idxd/registers.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/idxd/registers.h b/drivers/dma/idxd/registers.h index 9c1c546fe443..02bab136385e 100644 --- a/drivers/dma/idxd/registers.h +++ b/drivers/dma/idxd/registers.h @@ -3,7 +3,11 @@ #ifndef _IDXD_REGISTERS_H_ #define _IDXD_REGISTERS_H_ +#ifdef __KERNEL__ #include <uapi/linux/idxd.h> +#else +#include <linux/idxd.h> +#endif /* PCI Config */ #define PCI_DEVICE_ID_INTEL_DSA_GNRD 0x11fb |
