Use of MTX_UNOWNED in booke/trap_subr.S
Rafal Jaworowski
raj at semihalf.com
Thu Nov 11 13:52:24 UTC 2010
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.
Rafal
More information about the freebsd-ppc
mailing list