From 865fb530311ec1d66422fd3d2be870c887fce599 Mon Sep 17 00:00:00 2001 From: David Arinzon Date: Thu, 28 Nov 2024 08:55:46 +0200 Subject: [PATCH] linux/ena: Patch - Resolve compilation issue with adjfreq Signed-off-by: David Arinzon --- kernel/linux/ena/config/test_defs.sh | 9 +++++++++ kernel/linux/ena/kcompat.h | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/kernel/linux/ena/config/test_defs.sh b/kernel/linux/ena/config/test_defs.sh index dee8d2a..ab7ab53 100755 --- a/kernel/linux/ena/config/test_defs.sh +++ b/kernel/linux/ena/config/test_defs.sh @@ -142,3 +142,12 @@ try_compile_async "#include " \ "ENA_NAPI_IRQ_AND_QUEUE_ASSOC" \ "" \ "6.8.0 <= LINUX_VERSION_CODE" + +try_compile_async "#include " \ + "{ + struct ptp_clock_info ptp_clk_info; + ptp_clk_info.adjfreq = NULL; + }" \ + "ENA_PHC_SUPPORT_ADJFREQ" \ + "" \ + "3.0.0 <= LINUX_VERSION_CODE && LINUX_VERSION_CODE < 6.2.0" diff --git a/kernel/linux/ena/kcompat.h b/kernel/linux/ena/kcompat.h index ddc9c60..eb745d5 100644 --- a/kernel/linux/ena/kcompat.h +++ b/kernel/linux/ena/kcompat.h @@ -986,10 +986,6 @@ static inline bool ktime_after(const ktime_t cmp1, const ktime_t cmp2) #define ENA_PHC_SUPPORT_GETTIME64_EXTENDED #endif /* ENA_PHC_SUPPORT_GETTIME64_EXTENDED */ -#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 0, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0))) -#define ENA_PHC_SUPPORT_ADJFREQ -#endif /* ENA_PHC_SUPPORT_ADJFREQ */ - #if ((LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0)) && \ !(RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6, 4)))) #define ptp_clock_register(info, parent) ptp_clock_register(info) -- 2.34.1