Date: Thu, 11 Nov 2010 14:36:17 +0100 From: Rafal Jaworowski <raj@semihalf.com> To: John Baldwin <jhb@freebsd.org> Cc: raj@freebsd.org, powerpc@freebsd.org, dim@freebsd.org Subject: Re: Use of MTX_UNOWNED in booke/trap_subr.S Message-ID: <F8402B02-802B-435E-B276-872B2B6BB764@semihalf.com> In-Reply-To: <201011101714.33194.jhb@freebsd.org>
index | next in thread | previous in thread | raw e-mail
On 2010-11-10, at 23:14, John Baldwin wrote: > First of, sorry for breaking the build. I built a powerpc GENERIC and a > powerpc64 GENERIC before I committed, but that obviously wasn't sufficient. > dim@ pointed me at the use of MTX_UNOWNED in booke/trap_subr.S. The first > thought I had was to re-allow <sys/mutex.h> in assembly code, or to expose > MTX_UNOWNED via assym.s. However, it looks like the tlb lock in trap_subr.S > is a home-grown spinlock rather than an actual 'struct mtx'. For that reason, > I'd prefer it use its own constant to avoid confusion. To that end, the patch > below adds a TLB_UNLOCKED constant to <machine/tlb.h> and uses it for the tlb > locks. > > (I do wonder if we couldn't put the tlb_lock/unlock prototypes in > machine/tlb.h as well rather than booke/pmap.c? Then it could all be grouped > together to be more consistent.) Thanks, it's true the MTX_UNOWNED was a bit abused in this context. The changes are good (I have tested with MPC8572), I also moved the prototypes to machine/tlb.h per suggestion. Commited as r215119. Rafalhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F8402B02-802B-435E-B276-872B2B6BB764>
