From c027b9de7e82afd5963c1a6fea3ad8aff2ee1032 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 13 Oct 2019 21:28:19 +0000 Subject: [PATCH] scst: Port to UEK 4 Reported-by: Gilbert Standen git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8619 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- .gitignore | 3 +++ qla2x00t-32gbit/qla_os.c | 4 +++- scst/include/backport.h | 10 ++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0040a15e1..a2a7dbba6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,11 @@ *.o *.o.d *.orig +*.sdtinfo.c +*.sdtstub.S *~ .cache.mk +.ctf .depend_adm .depend_d .depend_f diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 9eefda265..7fcd3f121 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -7161,7 +7161,9 @@ static int qla2xxx_map_queues(struct Scsi_Host *shost) if (USER_CTRL_IRQ(vha->hw)) rc = blk_mq_map_queues(&shost->tag_set); else -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && \ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) && \ + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)) && \ !defined(CONFIG_SUSE_KERNEL) /* * See also commit f23f5bece686 ("blk-mq: Allow PCI vector diff --git a/scst/include/backport.h b/scst/include/backport.h index 9696d83e4..7f8bb03a7 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -859,6 +859,7 @@ static inline void mempool_destroy_backport(mempool_t *pool) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) && \ (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7 || \ (RHEL_MAJOR -0 == 7 && RHEL_MINOR -0 < 5)) && \ + !defined(UEK_KABI_RENAME) && \ !defined(_COMPAT_LINUX_MM_H) /* See also commit a7c3e901a46f ("mm: introduce kv[mz]alloc helpers") # v4.12 */ static inline void *kvmalloc_node(size_t size, gfp_t flags, int node) @@ -1379,8 +1380,13 @@ static inline struct kmem_cache *kmem_cache_create_usercopy(const char *name, { return kmem_cache_create(name, size, align, flags, ctor, NULL); } -/* UEKR5 is based on kernel v4.14.35 but has a backport of the v4.16 API. */ -#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) && !defined(UEK_KABI_RENAME) +/* + * UEK4 is based on kernel v4.1.12 and does not have a backport of the v4.16 + * API. UEK5 is based on kernel v4.14.35 and has a backport of the v4.16 API. + */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) && \ + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)) static inline struct kmem_cache *kmem_cache_create_usercopy(const char *name, unsigned int size, unsigned int align, unsigned long flags,