aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/context_tracking.c1
-rw-r--r--kernel/sched/core.c2
-rw-r--r--kernel/sched/cputime.c6
-rw-r--r--kernel/time/tick-broadcast.c4
-rw-r--r--kernel/time/tick-sched.c2
5 files changed, 5 insertions, 10 deletions
diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
index 65349f07b878..85bdde1137eb 100644
--- a/kernel/context_tracking.c
+++ b/kernel/context_tracking.c
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17#include <linux/context_tracking.h> 17#include <linux/context_tracking.h>
18#include <linux/kvm_host.h>
19#include <linux/rcupdate.h> 18#include <linux/rcupdate.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/hardirq.h> 20#include <linux/hardirq.h>
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 58453b8272fd..e1a27f918723 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4745,7 +4745,7 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
4745 */ 4745 */
4746 idle->sched_class = &idle_sched_class; 4746 idle->sched_class = &idle_sched_class;
4747 ftrace_graph_init_idle_task(idle, cpu); 4747 ftrace_graph_init_idle_task(idle, cpu);
4748 vtime_init_idle(idle); 4748 vtime_init_idle(idle, cpu);
4749#if defined(CONFIG_SMP) 4749#if defined(CONFIG_SMP)
4750 sprintf(idle->comm, "%s/%d", INIT_TASK_COMM, cpu); 4750 sprintf(idle->comm, "%s/%d", INIT_TASK_COMM, cpu);
4751#endif 4751#endif
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index cc2dc3eea8a3..b5ccba22603b 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -747,17 +747,17 @@ void arch_vtime_task_switch(struct task_struct *prev)
747 747
748 write_seqlock(&current->vtime_seqlock); 748 write_seqlock(&current->vtime_seqlock);
749 current->vtime_snap_whence = VTIME_SYS; 749 current->vtime_snap_whence = VTIME_SYS;
750 current->vtime_snap = sched_clock(); 750 current->vtime_snap = sched_clock_cpu(smp_processor_id());
751 write_sequnlock(&current->vtime_seqlock); 751 write_sequnlock(&current->vtime_seqlock);
752} 752}
753 753
754void vtime_init_idle(struct task_struct *t) 754void vtime_init_idle(struct task_struct *t, int cpu)
755{ 755{
756 unsigned long flags; 756 unsigned long flags;
757 757
758 write_seqlock_irqsave(&t->vtime_seqlock, flags); 758 write_seqlock_irqsave(&t->vtime_seqlock, flags);
759 t->vtime_snap_whence = VTIME_SYS; 759 t->vtime_snap_whence = VTIME_SYS;
760 t->vtime_snap = sched_clock(); 760 t->vtime_snap = sched_clock_cpu(cpu);
761 write_sequnlock_irqrestore(&t->vtime_seqlock, flags); 761 write_sequnlock_irqrestore(&t->vtime_seqlock, flags);
762} 762}
763 763
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 0c739423b0f9..b4c245580b79 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -698,10 +698,6 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
698 698
699 bc->event_handler = tick_handle_oneshot_broadcast; 699 bc->event_handler = tick_handle_oneshot_broadcast;
700 700
701 /* Take the do_timer update */
702 if (!tick_nohz_full_cpu(cpu))
703 tick_do_timer_cpu = cpu;
704
705 /* 701 /*
706 * We must be careful here. There might be other CPUs 702 * We must be careful here. There might be other CPUs
707 * waiting for periodic broadcast. We need to set the 703 * waiting for periodic broadcast. We need to set the
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index f4208138fbf4..0cf1c1453181 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -306,7 +306,7 @@ static int __cpuinit tick_nohz_cpu_down_callback(struct notifier_block *nfb,
306 * we can't safely shutdown that CPU. 306 * we can't safely shutdown that CPU.
307 */ 307 */
308 if (have_nohz_full_mask && tick_do_timer_cpu == cpu) 308 if (have_nohz_full_mask && tick_do_timer_cpu == cpu)
309 return -EINVAL; 309 return NOTIFY_BAD;
310 break; 310 break;
311 } 311 }
312 return NOTIFY_OK; 312 return NOTIFY_OK;