aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 15ffdb3f1948..4296d13db3d1 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -149,9 +149,11 @@ static unsigned long round_jiffies_common(unsigned long j, int cpu,
149 /* now that we have rounded, subtract the extra skew again */ 149 /* now that we have rounded, subtract the extra skew again */
150 j -= cpu * 3; 150 j -= cpu * 3;
151 151
152 if (j <= jiffies) /* rounding ate our timeout entirely; */ 152 /*
153 return original; 153 * Make sure j is still in the future. Otherwise return the
154 return j; 154 * unmodified value.
155 */
156 return time_is_after_jiffies(j) ? j : original;
155} 157}
156 158
157/** 159/**
@@ -1503,11 +1505,11 @@ signed long __sched schedule_timeout_uninterruptible(signed long timeout)
1503} 1505}
1504EXPORT_SYMBOL(schedule_timeout_uninterruptible); 1506EXPORT_SYMBOL(schedule_timeout_uninterruptible);
1505 1507
1506static int __cpuinit init_timers_cpu(int cpu) 1508static int init_timers_cpu(int cpu)
1507{ 1509{
1508 int j; 1510 int j;
1509 struct tvec_base *base; 1511 struct tvec_base *base;
1510 static char __cpuinitdata tvec_base_done[NR_CPUS]; 1512 static char tvec_base_done[NR_CPUS];
1511 1513
1512 if (!tvec_base_done[cpu]) { 1514 if (!tvec_base_done[cpu]) {
1513 static char boot_done; 1515 static char boot_done;
@@ -1575,7 +1577,7 @@ static void migrate_timer_list(struct tvec_base *new_base, struct list_head *hea
1575 } 1577 }
1576} 1578}
1577 1579
1578static void __cpuinit migrate_timers(int cpu) 1580static void migrate_timers(int cpu)
1579{ 1581{
1580 struct tvec_base *old_base; 1582 struct tvec_base *old_base;
1581 struct tvec_base *new_base; 1583 struct tvec_base *new_base;
@@ -1608,7 +1610,7 @@ static void __cpuinit migrate_timers(int cpu)
1608} 1610}
1609#endif /* CONFIG_HOTPLUG_CPU */ 1611#endif /* CONFIG_HOTPLUG_CPU */
1610 1612
1611static int __cpuinit timer_cpu_notify(struct notifier_block *self, 1613static int timer_cpu_notify(struct notifier_block *self,
1612 unsigned long action, void *hcpu) 1614 unsigned long action, void *hcpu)
1613{ 1615{
1614 long cpu = (long)hcpu; 1616 long cpu = (long)hcpu;
@@ -1633,7 +1635,7 @@ static int __cpuinit timer_cpu_notify(struct notifier_block *self,
1633 return NOTIFY_OK; 1635 return NOTIFY_OK;
1634} 1636}
1635 1637
1636static struct notifier_block __cpuinitdata timers_nb = { 1638static struct notifier_block timers_nb = {
1637 .notifier_call = timer_cpu_notify, 1639 .notifier_call = timer_cpu_notify,
1638}; 1640};
1639 1641