lkml.org 
[lkml]   [2003]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Sparc32 - sched_clock missing
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);
> +}
>
> _


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [from the cache]
©2003-2011 Jasper Spaans