From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AE9E14EC60; Fri, 12 Apr 2024 19:00:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712948453; cv=none; b=E8W2l+6h/MSG94Y4nySB3B+1JDchWVsn9Lkut7JrCyVqF4m2P+Y3Dz0kYOlitIg1zjb/j3UNmQ/Up5qKYMf1W0Pixe9d6ZqW8LTznQRuSdxCybkuinIPpQiVc3z7PR76FyYlvyBdvgDU3MtK7HgD8gkenamNXaOMnS0lmufenZk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712948453; c=relaxed/simple; bh=zjERDaZxnJcQkN5CsXJlf2FvNFLdjHZ+EAHGDAdZ/ng=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jTzVQ2vFtI00wZbREoZKm9t80zgxBpUdGuoWjsPrPi4lb6JM6MB6T/9CxV+pt2BoPHo/gyTefNzrvhIGrp6vCiGL3tSJid1GKbjjGyrsKOSSSAATF4gl682FREJtld+aSPm4zJ9/36lNPg1z6Lc3mYVVrdLO/R2g0xfr0OuBYU0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fv70IH6H; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fv70IH6H" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E802C113CC; Fri, 12 Apr 2024 19:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712948453; bh=zjERDaZxnJcQkN5CsXJlf2FvNFLdjHZ+EAHGDAdZ/ng=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fv70IH6HmhET0vREPnCPAMw7Zte6KDR18caLJzQeXRwxqTL3cawpT4GwCrOrEc4Iz aDIwNQLY4iuGz2uT6ddt6Drg20rKv8pLAQY+S9iJ5MJfTkj1Slz72G5IjBok911JBa OGW9Ly/6Sgpxi7thDG2JTywWye/BPbTzIr75uHA/UvcFvbE5mZNDHTZOYVjNG/hYKa F2VPZREepVD5IIuM2tBNpHszwqYu1VY50G5VS/JY8jKs0687DtugQAf1/SsVJ6WGqK Ti16VSTjb8XNu5k4X46LeIYUzY8u/OIUDWq0hSDH5lav6BZtioOlRauXV7ViOfCO+e k26f2bOKdS9Zw== Date: Fri, 12 Apr 2024 20:00:46 +0100 From: Conor Dooley To: Charlie Jenkins Cc: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Jonathan Corbet , Shuah Khan , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH 12/19] riscv: Create xtheadvector file Message-ID: <20240412-displease-sensually-33d91fc3fe63@spud> References: <20240411-dev-charlie-support_thead_vector_6_9-v1-0-4af9815ec746@rivosinc.com> <20240411-dev-charlie-support_thead_vector_6_9-v1-12-4af9815ec746@rivosinc.com> <20240412-thirty-sacrament-db052c7fe6fe@wendy> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yiuYflu9z+To5kfn" Content-Disposition: inline In-Reply-To: --yiuYflu9z+To5kfn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 12, 2024 at 11:24:35AM -0700, Charlie Jenkins wrote: > On Fri, Apr 12, 2024 at 12:30:32PM +0100, Conor Dooley wrote: > > On Thu, Apr 11, 2024 at 09:11:18PM -0700, Charlie Jenkins wrote: > > > These definitions didn't fit anywhere nicely, so create a new file to > > > house various xtheadvector instruction encodings. > > >=20 > > > Signed-off-by: Charlie Jenkins > > > --- > > > arch/riscv/include/asm/xtheadvector.h | 25 +++++++++++++++++++++++++ > > > 1 file changed, 25 insertions(+) > > >=20 > > > diff --git a/arch/riscv/include/asm/xtheadvector.h b/arch/riscv/inclu= de/asm/xtheadvector.h > > > new file mode 100644 > > > index 000000000000..348263ea164c > > > --- /dev/null > > > +++ b/arch/riscv/include/asm/xtheadvector.h > > > @@ -0,0 +1,25 @@ > > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > > + > > > +/* > > > + * Vector 0.7.1 as used for example on T-Head Xuantie cores, uses an= older > > > + * encoding for vsetvli (ta, ma vs. d1), so provide an instruction f= or > > > + * vsetvli t4, x0, e8, m8, d1 > > > + */ > > > +#define THEAD_VSETVLI_T4X0E8M8D1 ".long 0x00307ed7\n\t" > > > +#define THEAD_VSETVLI_X0X0E8M8D1 ".long 0x00307057\n\t" > > > + > > > +/* > > > + * While in theory, the vector-0.7.1 vsb.v and vlb.v result in the s= ame > > > + * encoding as the standard vse8.v and vle8.v, compilers seem to opt= imize > > > + * the call resulting in a different encoding and then using a value= for > > > + * the "mop" field that is not part of vector-0.7.1 > > > + * So encode specific variants for vstate_save and _restore. > >=20 > > This wording seems oddly familiar to me, did Heiko not write this? >=20 > Yeah, I wasn't sure how to attribute him. He wrote almost all of the > lines in this file, but I put it together into this file. What is the > standard way of doing that? The original patches have his sob and authorship, so I would at least expect co-developed-by. --yiuYflu9z+To5kfn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZhmE3gAKCRB4tDGHoIJi 0pxvAP9yVWDaNANZULFGFjAROk1PKk4c4Q7mCmsZPOAQYvlN8wEA59scy5YtWI5N LccwmxaDOXa8yoM0s7fRijgi3x//xwI= =OBaT -----END PGP SIGNATURE----- --yiuYflu9z+To5kfn--