diff options
| author | 2013-07-08 01:10:26 -0700 | |
|---|---|---|
| committer | 2013-07-08 01:10:26 -0700 | |
| commit | 033d777f548645c3a906b73eef5d665aeee55092 (patch) | |
| tree | 707dd7757ed59882fb1ecaf73313c325fa20dec8 /kernel/timer.c | |
| parent | xtensa: fix section mismatch in pcibios_fixup_bus (diff) | |
| parent | hrtimer: Remove unused variable (diff) | |
Merge branch 'timers-core-for-linus' of https://git.kernel.org/cgit/linux/kernel/git/tip/tip into tst5
Diffstat (limited to 'kernel/timer.c')
| -rw-r--r-- | kernel/timer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index a860bba34412..15bc1b41021d 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -149,9 +149,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; } /** @@ -1539,12 +1541,12 @@ static int __cpuinit init_timers_cpu(int cpu) boot_done = 1; base = &boot_tvec_bases; } + spin_lock_init(&base->lock); tvec_base_done[cpu] = 1; } else { base = per_cpu(tvec_bases, cpu); } - spin_lock_init(&base->lock); for (j = 0; j < TVN_SIZE; j++) { INIT_LIST_HEAD(base->tv5.vec + j); |
