Date: Fri, 21 Mar 2014 04:45:57 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263464 - head/sys/powerpc/include Message-ID: <201403210445.s2L4jvEP011307@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Fri Mar 21 04:45:57 2014 New Revision: 263464 URL: http://svnweb.freebsd.org/changeset/base/263464 Log: Mask out SRR1 bits that aren't exported to the MSR. This appears to fix a strange condition with X on 32-bit PowerBooks I observed, caused by one of these bits getting set in the mcontext, but not set in the thread, which may be a symptom of another problem, more difficult to diagnose. Since these bits aren't exported anyway, this change makes it more explicit that the bits aren't MSR-related in SRR1. MFC after: 3 weeks Modified: head/sys/powerpc/include/psl.h Modified: head/sys/powerpc/include/psl.h ============================================================================== --- head/sys/powerpc/include/psl.h Fri Mar 21 04:33:38 2014 (r263463) +++ head/sys/powerpc/include/psl.h Fri Mar 21 04:45:57 2014 (r263464) @@ -88,15 +88,17 @@ #define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE) #elif defined(BOOKE_PPC4XX) #define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE | PSL_FP) +#define PSL_SRR1_MASK 0x00000000UL /* No mask on Book-E */ #elif defined(AIM) #ifdef __powerpc64__ #define PSL_KERNSET (PSL_SF | PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_RI) #else #define PSL_KERNSET (PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_RI) #endif +#define PSL_SRR1_MASK 0x78300000UL /* Bits 1-4, 10-15 (ppc32), 33-36, 42-47 (ppc64) */ #endif #define PSL_USERSET (PSL_KERNSET | PSL_PR) -#define PSL_USERSTATIC ~(PSL_VEC | PSL_FP | PSL_FE0 | PSL_FE1) +#define PSL_USERSTATIC (~(PSL_VEC | PSL_FP | PSL_FE0 | PSL_FE1) & ~PSL_SRR1_MASK) #endif /* _MACHINE_PSL_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403210445.s2L4jvEP011307>