X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=kernel%2Ftimer.c;h=2cf410480688e730ebccb9d4edbff477085404a0;hb=875966bda8f6e636b5c75a5afeb9eb5f18795368;hp=15ffdb3f1948b9468c2c04527beb8190b0d79d45;hpb=a8432588fc1e406e800e8bf88bebf4cd390b7f46;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/kernel/timer.c b/kernel/timer.c index 15ffdb3f1948..2cf410480688 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -49,6 +49,8 @@ #include #include +#include + #define CREATE_TRACE_POINTS #include @@ -149,9 +151,11 @@ static unsigned long round_jiffies_common(unsigned long j, int cpu, /* now that we have rounded, subtract the extra skew again */ j -= cpu * 3; - if (j <= jiffies) /* rounding ate our timeout entirely; */ - return original; - return j; + /* + * Make sure j is still in the future. Otherwise return the + * unmodified value. + */ + return time_is_after_jiffies(j) ? j : original; } /** @@ -820,7 +824,7 @@ unsigned long apply_slack(struct timer_list *timer, unsigned long expires) bit = find_last_bit(&mask, BITS_PER_LONG); - mask = (1 << bit) - 1; + mask = (1UL << bit) - 1; expires_limit = expires_limit & ~(mask); @@ -1112,7 +1116,9 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long), lock_map_acquire(&lockdep_map); trace_timer_expire_entry(timer); + mt_trace_sft_start(fn); fn(data); + mt_trace_sft_end(fn); trace_timer_expire_exit(timer); lock_map_release(&lockdep_map);