---
 kernel/trace/latency_hist.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Index: linux-3.18.43-rt46-fulldebug/kernel/trace/latency_hist.c
===================================================================
@ linux-3.18.43-rt46-fulldebug/kernel/trace/latency_hist.c:129 @ static notrace void probe_wakeup_latency
 	struct task_struct *p);
 static notrace void probe_wakeup_latency_hist_stop(void *v,
 	struct task_struct *prev, struct task_struct *next);
+#ifdef CONFIG_SMP
 static notrace void probe_sched_migrate_task(void *,
 	struct task_struct *task, int cpu);
+#endif
 static struct enable_data wakeup_latency_enabled_data = {
 	.latency_type = WAKEUP_LATENCY,
 	.enabled = 0,
@ linux-3.18.43-rt46-fulldebug/kernel/trace/latency_hist.c:697 @ do_enable(struct file *file, const char 
 				    probe_wakeup_latency_hist_start, NULL);
 				return ret;
 			}
+#ifdef CONFIG_SMP
 			ret = register_trace_sched_migrate_task(
 			    probe_sched_migrate_task, NULL);
 			if (ret) {
@ linux-3.18.43-rt46-fulldebug/kernel/trace/latency_hist.c:710 @ do_enable(struct file *file, const char 
 				    probe_wakeup_latency_hist_stop, NULL);
 				return ret;
 			}
+#endif
 			break;
 #endif
 #ifdef CONFIG_MISSED_TIMER_OFFSETS_HIST
@ linux-3.18.43-rt46-fulldebug/kernel/trace/latency_hist.c:793 @ do_enable(struct file *file, const char 
 				    probe_wakeup_latency_hist_start, NULL);
 				unregister_trace_sched_switch(
 				    probe_wakeup_latency_hist_stop, NULL);
+#ifdef CONFIG_SMP
 				unregister_trace_sched_migrate_task(
 				    probe_sched_migrate_task, NULL);
+#endif
 
 				for_each_online_cpu(cpu) {
 					per_cpu(wakeup_task, cpu) = NULL;
@ linux-3.18.43-rt46-fulldebug/kernel/trace/latency_hist.c:984 @ static DEFINE_RAW_SPINLOCK(wakeup_lock);
 #ifdef CONFIG_SWITCHTIME_HIST
 static DEFINE_RAW_SPINLOCK(switchtime_lock);
 #endif
+#ifdef CONFIG_SMP
 static notrace void probe_sched_migrate_task(void *v, struct task_struct *task,
 	int cpu)
 {
@ linux-3.18.43-rt46-fulldebug/kernel/trace/latency_hist.c:1005 @ static notrace void probe_sched_migrate_
 		raw_spin_unlock_irqrestore(&wakeup_lock, flags);
 
 #ifdef CONFIG_SWITCHTIME_HIST
-		{
-			struct task_struct *cpu_switchtime_task;
+                {
+                        struct task_struct *cpu_switchtime_task;
 
-			raw_spin_lock_irqsave(&switchtime_lock, flags);
-			cpu_switchtime_task = per_cpu(switchtime_task, old_cpu);
-			if (task == cpu_switchtime_task) {
-				put_task_struct(cpu_switchtime_task);
-				per_cpu(switchtime_task, old_cpu) = NULL;
-				cpu_switchtime_task =
-				    per_cpu(switchtime_task, cpu) = task;
-				get_task_struct(cpu_switchtime_task);
-			}
-			raw_spin_unlock_irqrestore(&switchtime_lock, flags);
-		}
+                        raw_spin_lock_irqsave(&switchtime_lock, flags);
+                        cpu_switchtime_task = per_cpu(switchtime_task, old_cpu);
+                        if (task == cpu_switchtime_task) {
+                                put_task_struct(cpu_switchtime_task);
+                                per_cpu(switchtime_task, old_cpu) = NULL;
+                                cpu_switchtime_task =
+                                    per_cpu(switchtime_task, cpu) = task;
+                                get_task_struct(cpu_switchtime_task);
+                        }
+                        raw_spin_unlock_irqrestore(&switchtime_lock, flags);
+                }
 #endif
 	}
 }
+#endif /* CONFIG_SMP */
 
 static notrace void probe_wakeup_latency_hist_start(void *v,
 	struct task_struct *p)