From caae300858323f8e9a88de3a338f023bbc24f453 Mon Sep 17 00:00:00 2001 From: Satya Durga Srinivasu Prabhala Date: Tue, 16 Jan 2024 21:19:04 -0800 Subject: [PATCH] ANDROID: timer: update vendor hook for timer calc index commit '5ae616b4a60d ANDROID: timer: Add vendor hook for timer calc index' is changing the expires value only for bucket calculation, so timer wont be very precise in this case. Bug: 178758017 Change-Id: I8218a4065d31ed60bafdbbb36c1d6d9c9f0a6e9e Signed-off-by: Satya Durga Srinivasu Prabhala --- kernel/time/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 57e61db98834..e8148f77e31b 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -527,8 +527,8 @@ static inline unsigned calc_index(unsigned long expires, unsigned lvl, * * Round up with level granularity to prevent this. */ - expires = (expires >> LVL_SHIFT(lvl)) + 1; trace_android_vh_timer_calc_index(lvl, &expires); + expires = (expires >> LVL_SHIFT(lvl)) + 1; *bucket_expiry = expires << LVL_SHIFT(lvl); return LVL_OFFS(lvl) + (expires & LVL_MASK); }