From 6eff2fc2878a1e35061bfc2c3ef83eee0df7f112 Mon Sep 17 00:00:00 2001 From: Manoj Takasi <133196374+ManojTakasi@users.noreply.github.com> Date: Tue, 27 Jun 2023 16:37:45 +0530 Subject: [PATCH] XRT OS Support for RHEl 8.8 and 9.2 (#7603) * XRT OS Support for RHEl 8.8 and 9.2 Signed-off-by: Manoj Takasi * Made few changes to provide OS support for RHEL 8.8 and 9.2 Signed-off-by: Manoj Takasi --------- Signed-off-by: Manoj Takasi --- .../core/pcie/driver/linux/xocl/subdev/ulite.c | 6 +++--- .../core/pcie/driver/linux/xocl/userpf/xocl_bo.h | 2 +- src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/runtime_src/core/pcie/driver/linux/xocl/subdev/ulite.c b/src/runtime_src/core/pcie/driver/linux/xocl/subdev/ulite.c index cb880add264..eedebc8383c 100644 --- a/src/runtime_src/core/pcie/driver/linux/xocl/subdev/ulite.c +++ b/src/runtime_src/core/pcie/driver/linux/xocl/subdev/ulite.c @@ -338,12 +338,12 @@ static void ulite_shutdown(struct uart_port *port) mutex_unlock(&pdata->lock); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) +#if (LINUX_VERSION_CODE > KERNEL_VERSION(6, 1, 0)) || defined(RHEL_9_2_GE) static void ulite_set_termios(struct uart_port *port, struct ktermios *termios, - struct ktermios *old) + const struct ktermios *old) #else static void ulite_set_termios(struct uart_port *port, struct ktermios *termios, - const struct ktermios *old) + struct ktermios *old) #endif { unsigned long flags; diff --git a/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_bo.h b/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_bo.h index e4bf5743420..5b7f3e69e61 100644 --- a/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_bo.h +++ b/src/runtime_src/core/pcie/driver/linux/xocl/userpf/xocl_bo.h @@ -70,7 +70,7 @@ #define XOCL_BO_ARE (1 << 26) // Linux 5.18 uses iosys-map instead of dma-buf-map -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || defined(RHEL_8_7) || defined(RHEL_9_1_GE) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || defined(RHEL_8_7_GE) #define XOCL_MAP_TYPE iosys_map #define XOCL_MAP_SET_VADDR iosys_map_set_vaddr #define XOCL_MAP_IS_NULL iosys_map_is_null diff --git a/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h b/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h index 8777d45b057..4c0779c7933 100644 --- a/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h +++ b/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h @@ -169,14 +169,14 @@ #endif #if defined(RHEL_RELEASE_CODE) -#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 1) -#define RHEL_9_1_GE +#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 2) +#define RHEL_9_2_GE #endif #if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0) #define RHEL_9_0_GE #endif -#if RHEL_RELEASE_CODE == RHEL_RELEASE_VERSION(8, 7) -#define RHEL_8_7 +#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 7) +#define RHEL_8_7_GE #endif #if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 5) #define RHEL_8_5_GE