Date: Thu, 12 May 2011 06:03:58 +0200 From: Artem Belevich <art@freebsd.org> To: Attilio Rao <attilio@freebsd.org> Cc: svn-src-projects@freebsd.org, Oleksandr Tymoshenko <gonzo@freebsd.org>, src-committers@freebsd.org, Warner Losh <imp@freebsd.org>, Bruce Evans <brde@optusnet.com.au> Subject: Re: svn commit: r221614 - projects/largeSMP/sys/powerpc/include Message-ID: <BANLkTiktwEvRktZrGOqKKB2iSB99a3Jw=g@mail.gmail.com> In-Reply-To: <BANLkTi=e7GtBM-PTq9yJHSLRoaOWh62AeA@mail.gmail.com> References: <201105080039.p480doiZ021493@svn.freebsd.org> <BANLkTi=e7GtBM-PTq9yJHSLRoaOWh62AeA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 12, 2011 at 5:15 AM, Attilio Rao <attilio@freebsd.org> wrote: > 2011/5/8 Attilio Rao <attilio@freebsd.org>: >> Author: attilio >> Date: Sun May =A08 00:39:49 2011 >> New Revision: 221614 >> URL: http://svn.freebsd.org/changeset/base/221614 >> >> Log: >> =A0All architectures define the size-bounded types (uint32_t, uint64_t, = etc.) >> =A0starting from base C types (int, long, etc). > > mips seems having the same issue, so here is my patch: > http://www.freebsd.org/~attilio/largeSMP/mips-atomic.diff I see at least one problem. N32 ABI is ILP32 even though it can use 64-bit registers for "long long". > #if defined(__mips_n64) || defined(__mips_n32) > static __inline void >-atomic_set_64(__volatile uint64_t *p, uint64_t v) >+atomic_set_long(__volatile u_long *p, u_long v) Using _long here would not match the assembly on N32. If you stick with your changes, then you should drop __mips_n32 from the ifdef above. You may also want to add atomic_*_longlong for n32. Actually, for o64 as we= ll. I think for mips sticking with atomic_*_<size> would be a better fit considering ABI zoo we potentially have to deal with. --Artem
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTiktwEvRktZrGOqKKB2iSB99a3Jw=g>