X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Flinux%2Figb_uio%2Fcompat.h;h=8dbb896ae1185997a1091750e9eaf53b1fa901a9;hb=87efaea6376c8ae1a69e471450744a973995726b;hp=ce456d4bb7d8c0dbc040d8ab3b6776c26f663684;hpb=acaa9ee991b584d536ffa9529f063d11be7923a4;p=dpdk.git diff --git a/kernel/linux/igb_uio/compat.h b/kernel/linux/igb_uio/compat.h index ce456d4bb7..8dbb896ae1 100644 --- a/kernel/linux/igb_uio/compat.h +++ b/kernel/linux/igb_uio/compat.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Minimal wrappers to allow compiling igb_uio on older kernels. */ @@ -121,8 +122,8 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev) #endif /* < 3.3.0 */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) -#define HAVE_ALLOC_IRQ_VECTORS 1 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) +#define HAVE_PCI_IS_BRIDGE_API 1 #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) @@ -132,3 +133,22 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) #define HAVE_PCI_MSI_MASK_IRQ 1 #endif + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) +#define HAVE_ALLOC_IRQ_VECTORS 1 +#endif + +static inline bool igbuio_kernel_is_locked_down(void) +{ +#ifdef CONFIG_LOCK_DOWN_KERNEL +#ifdef CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT + return kernel_is_locked_down(NULL); +#elif defined(CONFIG_EFI_SECURE_BOOT_LOCK_DOWN) + return kernel_is_locked_down(); +#else + return false; +#endif +#else + return false; +#endif +}