* Sparc32 - sched_clock missing
@ 2003-10-04 13:51 Georg Chini
2003-10-04 18:54 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Georg Chini @ 2003-10-04 13:51 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Sparc32 - sched_clock missing
2003-10-04 13:51 Sparc32 - sched_clock missing Georg Chini
@ 2003-10-04 18:54 ` Andrew Morton
2003-10-04 20:20 ` Georg Chini
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2003-10-04 18:54 UTC (permalink / raw)
To: Georg Chini; +Cc: linux-kernel, Pete Zaitcev
Georg Chini <georg.chini@triaton-webhosting.com> wrote:
>
> 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.
>
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_clock arch/sparc/kernel/time.c
--- 25/arch/sparc/kernel/time.c~sparc32-sched_clock 2003-10-04 11:53:19.000000000 -0700
+++ 25-akpm/arch/sparc/kernel/time.c 2003-10-04 11:53:41.000000000 -0700
@@ -617,3 +617,12 @@ static int set_rtc_mmss(unsigned long no
return -1;
}
}
+
+/*
+ * Returns nanoseconds
+ */
+
+unsigned long long sched_clock(void)
+{
+ return (unsigned long long)jiffies * (1000000000 / HZ);
+}
_
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Sparc32 - sched_clock missing
2003-10-04 18:54 ` Andrew Morton
@ 2003-10-04 20:20 ` Georg Chini
0 siblings, 0 replies; 3+ messages in thread
From: Georg Chini @ 2003-10-04 20:20 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, Pete Zaitcev
Thanks a lot, I can compile and boot the kernel now.
But still the keyboard does not work...
Regards
Georg Chini
Andrew Morton wrote:
> Georg Chini <georg.chini@triaton-webhosting.com> wrote:
>
>>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.
>>
>
>
> 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_clock arch/sparc/kernel/time.c
> --- 25/arch/sparc/kernel/time.c~sparc32-sched_clock 2003-10-04 11:53:19.000000000 -0700
> +++ 25-akpm/arch/sparc/kernel/time.c 2003-10-04 11:53:41.000000000 -0700
> @@ -617,3 +617,12 @@ static int set_rtc_mmss(unsigned long no
> return -1;
> }
> }
> +
> +/*
> + * Returns nanoseconds
> + */
> +
> +unsigned long long sched_clock(void)
> +{
> + return (unsigned long long)jiffies * (1000000000 / HZ);
> +}
>
> _
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-10-04 20:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-04 13:51 Sparc32 - sched_clock missing Georg Chini
2003-10-04 18:54 ` Andrew Morton
2003-10-04 20:20 ` Georg Chini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox