From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIZM9-0006IG-Bf for qemu-devel@nongnu.org; Wed, 26 Feb 2014 02:56:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIZM5-0002T9-Ca for qemu-devel@nongnu.org; Wed, 26 Feb 2014 02:56:41 -0500 Received: from host-82-135-62-35.customer.m-online.net ([82.135.62.35]:44353 helo=mail.embedded-brains.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIZM5-0002T3-3a for qemu-devel@nongnu.org; Wed, 26 Feb 2014 02:56:37 -0500 Message-ID: <530D9E33.8090504@embedded-brains.de> Date: Wed, 26 Feb 2014 08:56:35 +0100 From: Sebastian Huber MIME-Version: 1.0 References: <1392394012-8661-1-git-send-email-sebastian.huber@embedded-brains.de> <52FE42B3.7080200@suse.de> In-Reply-To: <52FE42B3.7080200@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4] target-sparc: Add and use CPU_FEATURE_CASA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org, Fabien Chouteau Hello, exists there someone who is able to commit this? On 2014-02-14 17:22, Andreas F=C3=A4rber wrote: > Am 14.02.2014 17:06, schrieb Sebastian Huber: >> The LEON3 processor has support for the CASA instruction which is >> normally only available for SPARC V9 processors. Binutils 2.24 >> and GCC 4.9 will support this instruction for LEON3. GCC uses it to >> generate C11 atomic operations. >> >> The CAS synthetic instruction uses an ASI of 0x80. If TARGET_SPARC64 = is >> not defined use a supervisor data load/store for an ASI of 0x80 in >> helper_ld_asi()/helper_st_asi(). The supervisor data load/store was >> choosen according to the LEON3 documentation. >> >> The ASI 0x80 is defined in the SPARC V9 manual, Table 12=E2=80=94Addre= ss Space >> Identifiers (ASIs). Here we have: 0x80, ASI_PRIMARY, Unrestricted >> access, Primary address space. >> >> Tested with the following program: >> >> #include >> #include >> >> void test(void) >> { >> atomic_int a; >> int e; >> _Bool b; >> >> atomic_store(&a, 1); >> e =3D 1; >> b =3D atomic_compare_exchange_strong(&a, &e, 2); >> assert(b); >> assert(atomic_load(&a) =3D=3D 2); >> >> atomic_store(&a, 3); >> e =3D 4; >> b =3D atomic_compare_exchange_strong(&a, &e, 5); >> assert(!b); >> assert(atomic_load(&a) =3D=3D 3); >> } >> >> Tested also on a NGMP board with a LEON4 processor. >> >> v4: Fix coding style. >> >> Signed-off-by: Sebastian Huber >> Reviewed-by: Fabien Chouteau > > Reviewed-by: Andreas F=C3=A4rber > > but please put change logs below --- next time. No v5 needed for that, > committer can fix. > Also in my theory your Signed-off-by should be last when you submit a > patch, in particular when you apply changes on top of what a reviewer > has reviewed. > > Thanks, > Andreas > --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG= .