Re: sched_clock - microblaze

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michal Simek
Date: Thursday, April 15, 2010 - 11:23 pm

Arnd Bergmann wrote:

First of all - this technique works.

That calling sequence is
main.c: sched_init() -> sched.c: sched_init(); -> init_idle(); -> 
sched_clock() without initialized timer which is causing my problems.

Why is sched_clock called in init_idle? Do you get any non zero value on 
any ARCH?

Thanks,
Michal

diff --git a/kernel/sched.c b/kernel/sched.c
index 6af210a..bddd918 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5244,7 +5244,7 @@ void __cpuinit init_idle(struct task_struct *idle, 
int cpu)

         __sched_fork(idle);
         idle->state = TASK_RUNNING;
-       idle->se.exec_start = sched_clock();
+       idle->se.exec_start = 0;

         cpumask_copy(&idle->cpus_allowed, cpumask_of(cpu));
         __set_task_cpu(idle, cpu);

-- 
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sched_clock - microblaze, Michal Simek, (Thu Apr 15, 7:55 am)
Re: sched_clock - microblaze, Steven Rostedt, (Thu Apr 15, 8:04 am)
Re: sched_clock - microblaze, Steven J. Magnani, (Thu Apr 15, 8:06 am)
Re: sched_clock - microblaze, Michal Simek, (Thu Apr 15, 9:21 am)
Re: sched_clock - microblaze, Michal Simek, (Thu Apr 15, 9:32 am)
Re: sched_clock - microblaze, Wu Zhangjin, (Thu Apr 15, 10:18 am)
Re: sched_clock - microblaze, Wu Zhangjin, (Thu Apr 15, 11:12 am)
Re: sched_clock - microblaze, Thomas Gleixner, (Thu Apr 15, 11:26 am)
Re: sched_clock - microblaze, Michal Simek, (Thu Apr 15, 12:29 pm)
Re: sched_clock - microblaze, Arnd Bergmann, (Thu Apr 15, 12:52 pm)
Re: sched_clock - microblaze, Michal Simek, (Thu Apr 15, 11:23 pm)
Re: sched_clock - microblaze, Arnd Bergmann, (Fri Apr 16, 1:37 am)
Re: sched_clock - microblaze, Michal Simek, (Fri Apr 16, 2:11 am)