From b53bf7cefd7c451931459a9709406b1c93a3b839 Mon Sep 17 00:00:00 2001 From: AMD Toolchain Support <73240730+amd-toolchain-support@users.noreply.github.com> Date: Fri, 12 Feb 2021 15:31:55 +0530 Subject: [PATCH] xpmem: Added RHEL 8.3 support (#21563) --- var/spack/repos/builtin/packages/xpmem/package.py | 5 +++++ .../builtin/packages/xpmem/xpmem_v2.6.5-36.patch | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/xpmem/xpmem_v2.6.5-36.patch diff --git a/var/spack/repos/builtin/packages/xpmem/package.py b/var/spack/repos/builtin/packages/xpmem/package.py index 5acb537125..a5f56d74b0 100644 --- a/var/spack/repos/builtin/packages/xpmem/package.py +++ b/var/spack/repos/builtin/packages/xpmem/package.py @@ -25,6 +25,7 @@ class Xpmem(AutotoolsPackage): # Versions starting 2.6.4 are neither tagged nor released in the repo # (the choice of commits is based on the commit history of # 'kernel/xpmem_private.h'): + version('2.6.5-36', commit='0d0bad4e1d07b38d53ecc8f20786bb1328c446da') version('2.6.5', commit='4efeed9cbaabe971f3766d67cb108e2c3316d4b8') version('2.6.4', commit='522054850e4d1479d69f50f7190d1548bf9749fd') @@ -35,6 +36,10 @@ class Xpmem(AutotoolsPackage): variant('kernel-module', default=True, description='Enable building the kernel module') + # Added RHEL 8.3 kernel support + # Here 2.6.5-36 referes to 2.6.5 version and 36th commit id + patch('xpmem_v2.6.5-36.patch', when="@2.6.5-36", level=1) + depends_on('autoconf', type='build') depends_on('automake', type='build') depends_on('libtool', type='build') diff --git a/var/spack/repos/builtin/packages/xpmem/xpmem_v2.6.5-36.patch b/var/spack/repos/builtin/packages/xpmem/xpmem_v2.6.5-36.patch new file mode 100644 index 0000000000..a17fba4ad1 --- /dev/null +++ b/var/spack/repos/builtin/packages/xpmem/xpmem_v2.6.5-36.patch @@ -0,0 +1,15 @@ +--- xpmem/kernel/xpmem_pfn.c 2021-02-08 22:49:05.321501753 -0800 ++++ xpmem.patch/kernel/xpmem_pfn.c 2021-02-08 23:30:30.875309634 -0800 +@@ -251,6 +251,12 @@ + cpu_to_node(task_cpu(current)) != cpu_to_node(task_cpu(src_task))) { + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0) + saved_mask = current->cpus_mask; ++#elif LINUX_VERSION_CODE == KERNEL_VERSION(4,18, 0) ++ #ifdef RHEL_RELEASE_CODE ++ #if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,3) ++ saved_mask = current->cpus_mask; ++ #endif ++ #endif + #else + saved_mask = current->cpus_allowed; + #endif