X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Flinux%2Figb_uio%2Fcompat.h;fp=kernel%2Flinux%2Figb_uio%2Fcompat.h;h=e5df51567a1d9413246dc1cbc19514f10d7cd988;hb=d67014c3d38b20ac4cfe103f5a7a2107feaa5acf;hp=b4131a5c8752bf042aa84011614a8c8be43d59b3;hpb=a36b40dd8ecfb61648045e418551f75055ca77f9;p=dpdk.git diff --git a/kernel/linux/igb_uio/compat.h b/kernel/linux/igb_uio/compat.h index b4131a5c87..e5df51567a 100644 --- a/kernel/linux/igb_uio/compat.h +++ b/kernel/linux/igb_uio/compat.h @@ -126,10 +126,6 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev) #define HAVE_PCI_IS_BRIDGE_API 1 #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) -#define HAVE_ALLOC_IRQ_VECTORS 1 -#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) #define HAVE_MSI_LIST_IN_GENERIC_DEVICE 1 #endif @@ -137,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 CONFIG_EFI_SECURE_BOOT_LOCK_DOWN + return kernel_is_locked_down(); +#else + return false; +#endif +#else + return false; +#endif +}