All of lore.kernel.org
 help / color / mirror / Atom feed
* set_cp0_status (mipsregs.h)
@ 2001-04-06 18:32 Scott A McConnell
  2001-04-07  2:59 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Scott A McConnell @ 2001-04-06 18:32 UTC (permalink / raw)
  To: linux-mips

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;                                             \
}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-04-07  2:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-06 18:32 set_cp0_status (mipsregs.h) Scott A McConnell
2001-04-07  2:59 ` Ralf Baechle

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.