x86: uaccess: fix compilation error on CONFIG_M386
[safe/jmp/linux-2.6] / kernel / sched_debug.c
index 3625a65..4293cfa 100644 (file)
@@ -160,10 +160,14 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
        cgroup_path(tg->css.cgroup, path, sizeof(path));
 
        SEQ_printf(m, "\ncfs_rq[%d]:%s\n", cpu, path);
+#elif defined(CONFIG_USER_SCHED) && defined(CONFIG_FAIR_GROUP_SCHED)
+       {
+               uid_t uid = cfs_rq->tg->uid;
+               SEQ_printf(m, "\ncfs_rq[%d] for UID: %u\n", cpu, uid);
+       }
 #else
        SEQ_printf(m, "\ncfs_rq[%d]:\n", cpu);
 #endif
-
        SEQ_printf(m, "  .%-30s: %Ld.%06ld\n", "exec_clock",
                        SPLIT_NS(cfs_rq->exec_clock));
 
@@ -173,7 +177,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
        last = __pick_last_entity(cfs_rq);
        if (last)
                max_vruntime = last->vruntime;
-       min_vruntime = rq->cfs.min_vruntime;
+       min_vruntime = cfs_rq->min_vruntime;
        rq0_min_vruntime = per_cpu(runqueues, 0).cfs.min_vruntime;
        spin_unlock_irqrestore(&rq->lock, flags);
        SEQ_printf(m, "  .%-30s: %Ld.%06ld\n", "MIN_vruntime",
@@ -190,26 +194,8 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
                        SPLIT_NS(spread0));
        SEQ_printf(m, "  .%-30s: %ld\n", "nr_running", cfs_rq->nr_running);
        SEQ_printf(m, "  .%-30s: %ld\n", "load", cfs_rq->load.weight);
-#ifdef CONFIG_SCHEDSTATS
-#define P(n) SEQ_printf(m, "  .%-30s: %d\n", #n, rq->n);
-
-       P(yld_exp_empty);
-       P(yld_act_empty);
-       P(yld_both_empty);
-       P(yld_count);
 
-       P(sched_switch);
-       P(sched_count);
-       P(sched_goidle);
-
-       P(ttwu_count);
-       P(ttwu_local);
-
-       P(bkl_count);
-
-#undef P
-#endif
-       SEQ_printf(m, "  .%-30s: %ld\n", "nr_spread_over",
+       SEQ_printf(m, "  .%-30s: %d\n", "nr_spread_over",
                        cfs_rq->nr_spread_over);
 #ifdef CONFIG_FAIR_GROUP_SCHED
 #ifdef CONFIG_SMP
@@ -285,6 +271,25 @@ static void print_cpu(struct seq_file *m, int cpu)
 #undef P
 #undef PN
 
+#ifdef CONFIG_SCHEDSTATS
+#define P(n) SEQ_printf(m, "  .%-30s: %d\n", #n, rq->n);
+
+       P(yld_exp_empty);
+       P(yld_act_empty);
+       P(yld_both_empty);
+       P(yld_count);
+
+       P(sched_switch);
+       P(sched_count);
+       P(sched_goidle);
+
+       P(ttwu_count);
+       P(ttwu_local);
+
+       P(bkl_count);
+
+#undef P
+#endif
        print_cfs_stats(m, cpu);
        print_rt_stats(m, cpu);
 
@@ -447,10 +452,11 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
 #undef __P
 
        {
+               unsigned int this_cpu = raw_smp_processor_id();
                u64 t0, t1;
 
-               t0 = sched_clock();
-               t1 = sched_clock();
+               t0 = cpu_clock(this_cpu);
+               t1 = cpu_clock(this_cpu);
                SEQ_printf(m, "%-35s:%21Ld\n",
                           "clock-delta", (long long)(t1-t0));
        }