[Top] [All Lists]

Re: set_cp0_status (mipsregs.h)

To: Scott A McConnell <>
Subject: Re: set_cp0_status (mipsregs.h)
From: Ralf Baechle <>
Date: Sat, 7 Apr 2001 04:59:16 +0200
In-reply-to: <>; from on Fri, Apr 06, 2001 at 11:32:03AM -0700
References: <>
User-agent: Mutt/1.2.5i
On Fri, Apr 06, 2001 at 11:32:03AM -0700, Scott A McConnell wrote:

> Which is correct?
> 1 or 2 parameters ?
> The first comes from a 2.4.0 kernel and the second from a 2.4.2
> extracted from cvs a few days ago.

1 Parameter; I changed the functions since about half the calls in the
kernel code did show that whoever wrote the code didn't understand
what the function is supposed to do.

 - set_cp0_status(bits)

   Set all the bits described by the bitmask bits in the status register.
 - clear_cp0_status(bits)

   Clear all the bits set in the bitmask argument bits in the status register.

 - change_cp0_status(change, set)

   Set all bits which are set in the bitmask change to the value given by
   the bitmask set; all other bits stay unchanged.  This is the same as
   the old set_cp0_status function.

Most people want to use {set,clear}_cp0_status().


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