From: Scott A McConnell <samcconn@cotw.com>
To: linux-mips@oss.sgi.com
Subject: set_cp0_status (mipsregs.h)
Date: Fri, 06 Apr 2001 11:32:03 -0700 [thread overview]
Message-ID: <3ACE0BA3.98823D4D@cotw.com> (raw)
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; \
}
next reply other threads:[~2001-04-06 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-06 18:32 Scott A McConnell [this message]
2001-04-07 2:59 ` set_cp0_status (mipsregs.h) Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ACE0BA3.98823D4D@cotw.com \
--to=samcconn@cotw.com \
--cc=linux-mips@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.