linux-mips-fnet
[Top] [All Lists]

Re: asm/timex.h include mipsregs.h ?

To: Florian Lohoff <flo@rfc822.org>
Subject: Re: asm/timex.h include mipsregs.h ?
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Fri, 29 Oct 1999 01:31:36 +0200
Cc: linux@cthulhu.engr.sgi.com, linux-mips@fnet.fr, linux-mips@vger.rutgers.edu
In-reply-to: <19991028105913.A1254@paradigm.rfc822.org>
References: <19991028105913.A1254@paradigm.rfc822.org>
On Thu, Oct 28, 1999 at 10:59:13AM +0200, Florian Lohoff wrote:

> i am just in the process of building glibc and discovered a bug i stumpled
> over before ...
> 
> static inline cycles_t get_cycles (void)
> {
>         return read_32bit_cp0_register(CP0_COUNT);
> }
> 
> CP0_COUNT undefined ...
> 
> Shouldnt timex.h include mipsregs.h ?

Just wrap it with #ifdef __KERNEL, get_cycles cannot be use in the
userspace anyway as mfc0 is a priviledged instruction.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>