diff options
Diffstat (limited to 'kernel/timer.c')
| -rw-r--r-- | kernel/timer.c | 18 | 
1 files changed, 10 insertions, 8 deletions
| diff --git a/kernel/timer.c b/kernel/timer.c index 15ffdb3f194..4296d13db3d 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;  }  /** @@ -1503,11 +1505,11 @@ signed long __sched schedule_timeout_uninterruptible(signed long timeout)  }  EXPORT_SYMBOL(schedule_timeout_uninterruptible); -static int __cpuinit init_timers_cpu(int cpu) +static int init_timers_cpu(int cpu)  {  	int j;  	struct tvec_base *base; -	static char __cpuinitdata tvec_base_done[NR_CPUS]; +	static char tvec_base_done[NR_CPUS];  	if (!tvec_base_done[cpu]) {  		static char boot_done; @@ -1575,7 +1577,7 @@ static void migrate_timer_list(struct tvec_base *new_base, struct list_head *hea  	}  } -static void __cpuinit migrate_timers(int cpu) +static void migrate_timers(int cpu)  {  	struct tvec_base *old_base;  	struct tvec_base *new_base; @@ -1608,7 +1610,7 @@ static void __cpuinit migrate_timers(int cpu)  }  #endif /* CONFIG_HOTPLUG_CPU */ -static int __cpuinit timer_cpu_notify(struct notifier_block *self, +static int timer_cpu_notify(struct notifier_block *self,  				unsigned long action, void *hcpu)  {  	long cpu = (long)hcpu; @@ -1633,7 +1635,7 @@ static int __cpuinit timer_cpu_notify(struct notifier_block *self,  	return NOTIFY_OK;  } -static struct notifier_block __cpuinitdata timers_nb = { +static struct notifier_block timers_nb = {  	.notifier_call	= timer_cpu_notify,  }; | 
