| To: | linux-mips@oss.sgi.com |
|---|---|
| Subject: | set_cp0_status (mipsregs.h) |
| From: | Scott A McConnell <samcconn@cotw.com> |
| Date: | Fri, 06 Apr 2001 11:32:03 -0700 |
| Sender: | owner-linux-mips@oss.sgi.com |
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.
Thanks,
Scott
--------------------------------------------
/*
* Manipulate the status register.
* Mostly used to access the interrupt bits.
*/
#define __BUILD_SET_CP0(name,register) \
extern __inline__ unsigned int \
set_cp0_##name(unsigned int change, unsigned int new) \
{ \
unsigned int res; \
\
res = read_32bit_cp0_register(register); \
res &= ~change; \
res |= (new & change); \
if(change) \
write_32bit_cp0_register(register, res); \
\
return res; \
}
__BUILD_SET_CP0(status,CP0_STATUS)
__BUILD_SET_CP0(cause,CP0_CAUSE)
__BUILD_SET_CP0(config,CP0_CONFIG)
------------------------- or --------------------------------
#define __BUILD_SET_CP0(name,register) \
extern __inline__ unsigned int \
set_cp0_##name(unsigned int set) \
{ \
unsigned int res; \
\
res = read_32bit_cp0_register(register); \
res |= set; \
write_32bit_cp0_register(register, res); \
\
return res; \
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: edata alignment, Justin Carlson |
|---|---|
| Next by Date: | Re: first packages for mipsel, Maciej W. Rozycki |
| Previous by Thread: | Re: first packages for mipsel, Florian Lohoff |
| Next by Thread: | Re: set_cp0_status (mipsregs.h), Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |