Date: Sat, 2 Feb 2008 23:43:39 GMT From: Olivier Houchard <cognet@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 134685 for review Message-ID: <200802022343.m12NhdJ8087583@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=134685 Change 134685 by cognet@cognet-mips on 2008/02/02 23:43:29 Only clear the required bits from SR, instead of zeroing it, for Octeon, or we will lose KX and bad things happen. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#10 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#10 (text+ko) ==== @@ -258,6 +258,17 @@ #define SAVE_REG(reg, offs, base) \ STORE reg, STAND_ARG_SIZE + (RSIZE * offs) (base) +#ifdef TARGET_OCTEON +#define CLEAR_STATUS \ + mfc0 a0, COP_0_STATUS_REG ;\ + li a2, ~(SR_INT_ENAB | SR_EXL | SR_KSU_MASK) ;\ + and a0, a0, a2 ;\ + mtc0 a0, COP_0_STATUS_REG +#else +#define CLEAR_STATUS \ + mtc0 zero, COP_0_STATUS_REG +#endif + #define SAVE_CPU \ SAVE_REG(AT, AST, sp) ;\ SAVE_REG(v0, V0, sp) ;\ @@ -293,7 +304,7 @@ addu v0, sp, KERN_EXC_FRAME_SIZE ;\ SAVE_REG(v0, SP, sp) ;\ addu a0, sp, STAND_ARG_SIZE ;\ - mtc0 zero,COP_0_STATUS_REG ;\ + CLEAR_STATUS ;\ ITLBNOPFIX #ifdef DDB
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802022343.m12NhdJ8087583>