diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-07-10 22:43:57 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-07-10 22:43:57 -0700 |
| commit | 4049db73f1a32cd633827f479cb25fdcd231d7f4 (patch) | |
| tree | ae3c1d3eb12080b447d732ba37540bb9f87f3a48 /kernel | |
| parent | 62b5f32c45c31528c5228a44c59d150e8a786421 (diff) | |
| parent | e1496b74425e222e349b829e84415a380a59f178 (diff) | |
Merge "Merge android-4.4.139 (7ba5557) into msm-4.4"
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/time/time.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/time/time.c b/kernel/time/time.c index 86751c68e08d..de70ac1f84d0 100644 --- a/kernel/time/time.c +++ b/kernel/time/time.c @@ -28,6 +28,7 @@ */ #include <linux/export.h> +#include <linux/kernel.h> #include <linux/timex.h> #include <linux/capability.h> #include <linux/timekeeper_internal.h> @@ -258,9 +259,10 @@ unsigned int jiffies_to_msecs(const unsigned long j) return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC); #else # if BITS_PER_LONG == 32 - return (HZ_TO_MSEC_MUL32 * j) >> HZ_TO_MSEC_SHR32; + return (HZ_TO_MSEC_MUL32 * j + (1ULL << HZ_TO_MSEC_SHR32) - 1) >> + HZ_TO_MSEC_SHR32; # else - return (j * HZ_TO_MSEC_NUM) / HZ_TO_MSEC_DEN; + return DIV_ROUND_UP(j * HZ_TO_MSEC_NUM, HZ_TO_MSEC_DEN); # endif #endif } |
