diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-12 18:16:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-12 18:16:26 -0400 |
commit | ccb1ec95e924a24906ef01ce6d028a8dc13dc87d (patch) | |
tree | b16a02083ba6843fe3f2513f74a72c95d43ddccb /kernel | |
parent | 4a1d7544fee5e601a4e642ce2720689f90428d65 (diff) | |
parent | d48fc63f6f3f485ed5aa9cf019d8e8e3a7d10263 (diff) |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner:
"The itimer removal one is not strictly a fix, but I really wanted to
avoid a rebase of the urgent ones."
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
Revert "clocksource: Load the ACPI PM clocksource asynchronously"
clockevents: tTack broadcast device mode change in tick_broadcast_switch_to_oneshot()
itimer: Use printk_once instead of WARN_ONCE
nohz: Fix stale jiffies update in tick_nohz_restart()
tick: Document TICK_ONESHOT config option
proc: stats: Use arch_idle_time for idle and iowait times if available
itimer: Schedule silent NULL pointer fixup in setitimer() for removal
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/itimer.c | 8 | ||||
-rw-r--r-- | kernel/time/Kconfig | 4 | ||||
-rw-r--r-- | kernel/time/tick-broadcast.c | 4 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 4 |
4 files changed, 15 insertions, 5 deletions
diff --git a/kernel/itimer.c b/kernel/itimer.c index 22000c3db0d..8d262b46757 100644 --- a/kernel/itimer.c +++ b/kernel/itimer.c | |||
@@ -284,8 +284,12 @@ SYSCALL_DEFINE3(setitimer, int, which, struct itimerval __user *, value, | |||
284 | if (value) { | 284 | if (value) { |
285 | if(copy_from_user(&set_buffer, value, sizeof(set_buffer))) | 285 | if(copy_from_user(&set_buffer, value, sizeof(set_buffer))) |
286 | return -EFAULT; | 286 | return -EFAULT; |
287 | } else | 287 | } else { |
288 | memset((char *) &set_buffer, 0, sizeof(set_buffer)); | 288 | memset(&set_buffer, 0, sizeof(set_buffer)); |
289 | printk_once(KERN_WARNING "%s calls setitimer() with new_value NULL pointer." | ||
290 | " Misfeature support will be removed\n", | ||
291 | current->comm); | ||
292 | } | ||
289 | 293 | ||
290 | error = do_setitimer(which, &set_buffer, ovalue ? &get_buffer : NULL); | 294 | error = do_setitimer(which, &set_buffer, ovalue ? &get_buffer : NULL); |
291 | if (error || !ovalue) | 295 | if (error || !ovalue) |
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index 2cf9cc7aa10..a20dc8a3c94 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig | |||
@@ -1,6 +1,10 @@ | |||
1 | # | 1 | # |
2 | # Timer subsystem related configuration options | 2 | # Timer subsystem related configuration options |
3 | # | 3 | # |
4 | |||
5 | # Core internal switch. Selected by NO_HZ / HIGH_RES_TIMERS. This is | ||
6 | # only related to the tick functionality. Oneshot clockevent devices | ||
7 | # are supported independ of this. | ||
4 | config TICK_ONESHOT | 8 | config TICK_ONESHOT |
5 | bool | 9 | bool |
6 | 10 | ||
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index e883f57a3cd..bf57abdc7bd 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -575,10 +575,12 @@ void tick_broadcast_switch_to_oneshot(void) | |||
575 | unsigned long flags; | 575 | unsigned long flags; |
576 | 576 | ||
577 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); | 577 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
578 | |||
579 | tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT; | ||
580 | |||
578 | if (cpumask_empty(tick_get_broadcast_mask())) | 581 | if (cpumask_empty(tick_get_broadcast_mask())) |
579 | goto end; | 582 | goto end; |
580 | 583 | ||
581 | tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT; | ||
582 | bc = tick_broadcast_device.evtdev; | 584 | bc = tick_broadcast_device.evtdev; |
583 | if (bc) | 585 | if (bc) |
584 | tick_broadcast_setup_oneshot(bc); | 586 | tick_broadcast_setup_oneshot(bc); |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 3526038f283..6a3a5b9ff56 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -534,9 +534,9 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now) | |||
534 | hrtimer_get_expires(&ts->sched_timer), 0)) | 534 | hrtimer_get_expires(&ts->sched_timer), 0)) |
535 | break; | 535 | break; |
536 | } | 536 | } |
537 | /* Update jiffies and reread time */ | 537 | /* Reread time and update jiffies */ |
538 | tick_do_update_jiffies64(now); | ||
539 | now = ktime_get(); | 538 | now = ktime_get(); |
539 | tick_do_update_jiffies64(now); | ||
540 | } | 540 | } |
541 | } | 541 | } |
542 | 542 | ||