Re: [PATCH 21/33] dmaengine: idxd: Allow registers.h to be included from tools/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Matlack <dmatlack@xxxxxxxxxx> writes:

> 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.
>
> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>

Acked-by: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxx>

> ---
>  drivers/dma/idxd/registers.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/dma/idxd/registers.h b/drivers/dma/idxd/registers.h
> index 006ba206ab1b..bf79bc39a5f3 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
> -- 
> 2.50.0.rc2.701.gf1e915cc24-goog
>

-- 
Vinicius




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux