-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/amdkcl: test jiffies64_to_msecs()
fake a kcl copy for legacy kernel support. Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Guchun Chen <guchun.chen@amd.com>
- Loading branch information
Flora Cui
authored and
Kent Russell
committed
Oct 27, 2020
1 parent
f6e990e
commit 8d11082
Showing
6 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
#include <linux/ktime.h> | ||
#include <kcl/kcl_timekeeping.h> | ||
|
||
#ifndef HAVE_JIFFIES64_TO_MSECS | ||
u64 jiffies64_to_msecs(const u64 j) | ||
{ | ||
#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ) | ||
return (MSEC_PER_SEC / HZ) * j; | ||
#else | ||
return div_u64(j * HZ_TO_MSEC_NUM, HZ_TO_MSEC_DEN); | ||
#endif | ||
} | ||
EXPORT_SYMBOL(jiffies64_to_msecs); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
dnl # | ||
dnl # v5.1-rc3-699-g3b15d09f7e6d | ||
dnl # time: Introduce jiffies64_to_msecs() | ||
dnl # | ||
AC_DEFUN([AC_AMDGPU_JIFFIES64_TO_MSECS], [ | ||
AC_KERNEL_DO_BACKGROUND([ | ||
AC_KERNEL_CHECK_SYMBOL_EXPORT([jiffies64_to_msecs], [kernel/time/time.c], [ | ||
AC_DEFINE(HAVE_JIFFIES64_TO_MSECS, 1, [jiffies64_to_msecs() is available]) | ||
]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters