From d745c16d4c9f2e45bf42b1d7014672527ec8fe78 Mon Sep 17 00:00:00 2001 From: ozeng Date: Thu, 3 Aug 2017 18:41:12 -0400 Subject: [PATCH 1313/4131] drm/amdkfd: Fixed a kfifo adaptation issue On old linux version there are both kfifo and kfifo-new interfaces. The adaptation to this was incorrect and caused different interpretation of struct kfifo in different C source files, which further caused a kfd interrupt handling issue. This fixed the issue by adapting kfifo consistently in one file (kfd_priv.h). Signed-off-by: Oak Zeng Reviewed-by: Junwei Zhang Reviewed-by: Yong Zhao Change-Id: I84d32a0a15118eafa158c01d728594987ae0cdd6 --- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 5 ----- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c b/drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c index 258fdda..4f4392a 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c @@ -42,11 +42,6 @@ #include #include -#if (defined OS_NAME_RHEL) && (OS_VERSION_MAJOR == 6) -#include -#else -#include -#endif #include "kfd_priv.h" #define KFD_IH_NUM_ENTRIES 8192 diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index e73a651..5a86251 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h @@ -36,7 +36,11 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0) +#include +#else #include +#endif #include #include "amd_rdma.h" -- 2.7.4