Sparc32 - sched_clock missing
Hello out there,
tried to build Kernel 2.6.0-test6-bk4 on my sparc32 machine and found that the function sched_clock is missing in time.c. Can anyone tell me what I have to put there? Please CC to me.
Thanks in advance
Georg Chini
Quoted 9 lines · Georg Chini
Hello out there,
tried to build Kernel 2.6.0-test6-bk4 on my sparc32 machine and found that the function
sched_clockis missing intime.c. Can anyone tell me what I have to put there? Please CC to me.
This is the minimal version to get you going.
A better implementation would use a higer-resolution counter, if the hardware has such a thing.
arch/sparc/kernel/time.c renamed from arch/sparc/kernel/time.c~sparc32-sched_clock +9 -0
@@ -617,3 +617,12 @@ static int set_rtc_mmss(unsigned long noreturn -1 ; } } + +/* +* Returns nanoseconds +*/ + +unsigned long long sched_clock (void ) +{ +return (unsigned long long )jiffies * (1000000000 /HZ ); +}
_
Thanks a lot, I can compile and boot the kernel now. But still the keyboard does not work...
Regards
Georg Chini
Quoted 36 lines · Andrew Morton
Quoted 8 lines · Georg Chini
Hello out there,
tried to build Kernel 2.6.0-test6-bk4 on my sparc32 machine and found that the function
sched_clockis missing intime.c. Can anyone tell me what I have to put there? Please CC to me.This is the minimal version to get you going.
A better implementation would use a higer-resolution counter, if the hardware has such a thing.
diff -puN
arch/sparc/kernel/time.c~sparc32-sched_clockarch/sparc/kernel/time.carch/sparc/kernel/time.c renamed from arch/sparc/kernel/time.c~sparc32-sched_clock +9
-0@@ -617,3 +617,12 @@ static int set_rtc_mmss(unsigned long noreturn -1 ; } } + +/* +* Returns nanoseconds +*/ + +unsigned long long sched_clock (void ) +{ +return (unsigned long long )jiffies * (1000000000 /HZ ); +}_