From: Seung-Woo Kim Date: Wed, 1 Jul 2020 02:05:44 +0000 (+0900) Subject: Support Linux kernel v5.4 X-Git-Tag: submit/tizen/20211126.100737~8^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3dc772aeedfdf4921ced1599b4f9cc33a4506e42;p=platform%2Fkernel%2Flinux-tizen-modules-source.git Support Linux kernel v5.4 To support rpi4 kernel based on Linux kernel v5.4, add wrapper for changed function name. With the Linux mainline commit 9285ec4c8b61 ("timekeeping: Use proper clock specifier names in functions") in v5.3, function ktime_get_boot_ns() is changed to ktime_get_boottime_ns(). Change-Id: I80e00592adea9e888daaef035f2332e5e7528eef Ref: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9285ec4c8b61d4930a575081abeba2cd4f449a74 Signed-off-by: Seung-Woo Kim --- diff --git a/kernel/proc-tsm.c b/kernel/proc-tsm.c index a23ec38..e86ec82 100644 --- a/kernel/proc-tsm.c +++ b/kernel/proc-tsm.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -48,6 +49,13 @@ static int blacklist_c = 0; module_param_array(blacklist, charp, &blacklist_c, 0000); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0) +/* ktime_get_boot_ns() is renamed to ktime_get_boottime_ns() from v5.3 */ +static inline u64 ktime_get_boot_ns(void) { + return ktime_get_boottime_ns(); +} +#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0) */ + static u64 time_now(void) { return div64_ul(ktime_get_boot_ns(), NSEC_PER_USEC);