FreeBSD/sys/mips/nlm/hal/haldefs.h
/*
 * For o32 compilation, we have to disable interrupts and enable KX bit to
 * access 64 bit addresses or data.
 *
 * We need to disable interrupts because we save just the lower 32 bits of
 * registers in  interrupt handling. So if we get hit by an interrupt while
 * using the upper 32 bits of a register, we lose.
 */
For o32 compilation, we have to disable interrupts and enable KX bit to
access 64 bit addresses or data.

We need to disable interrupts because we save just the lower 32 bits of
registers in  interrupt handling. So if we get hit by an interrupt while
using the upper 32 bits of a register, we lose.
For o32 compilation we have to disable interrupts and enable KX bit to access 64 bit addresses or data . We need to disable interrupts because we save just the lower 32 bits of registers in interrupt handling . So if we get hit by an interrupt while using the upper 32 bits of a register we lose .
static inline uint32_t nlm_save_flags_kx(void)
{
	uint32_t sr = mips_rd_status();
	mips_wr_status((sr & ~MIPS_SR_INT_IE) | MIPS_SR_KX);
	return (sr);
}
static inline uint32_t nlm_save_flags_kx ( void ) { uint32_t sr = mips_rd_status ( ) ; mips_wr_status ( ( sr & ~ MIPS_SR_INT_IE ) | MIPS_SR_KX ) ; return ( sr ) ; }
For o32 compilation, we have to disable interrupts and enable KX bit to
 access 64 bit addresses or data.
For o32 compilation we have to disable interrupts and enable KX bit to access 64 bit addresses or data .