Skip site navigation (1)Skip section navigation (2)
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>
References:  <201011101714.33194.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2010-11-10, at 23:14, John Baldwin wrote:

> First of, sorry for breaking the build.  I built a powerpc GENERIC and =
a=20
> powerpc64 GENERIC before I committed, but that obviously wasn't =
sufficient. =20
> dim@ pointed me at the use of MTX_UNOWNED in booke/trap_subr.S.  The =
first=20
> thought I had was to re-allow <sys/mutex.h> in assembly code, or to =
expose=20
> MTX_UNOWNED via assym.s.  However, it looks like the tlb lock in =
trap_subr.S=20
> is a home-grown spinlock rather than an actual 'struct mtx'.  For that =
reason,=20
> I'd prefer it use its own constant to avoid confusion.  To that end, =
the patch=20
> below adds a TLB_UNLOCKED constant to <machine/tlb.h> and uses it for =
the tlb=20
> locks.
>=20
> (I do wonder if we couldn't put the tlb_lock/unlock prototypes in=20
> machine/tlb.h as well rather than booke/pmap.c?  Then it could all be =
grouped=20
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F8402B02-802B-435E-B276-872B2B6BB764>