From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7339C4345F for ; Fri, 12 Apr 2024 18:24:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VcRm7dk6dCnd28K5Vu2h6PIxEMEhH27LHMFTQ9/vKaY=; b=RaFyO8e1KfKSKq wd7Dd3yXfy/IsTSqxgeBBLfBwZEmuqrhxPkVDyP6m6ZCLBnzcThqOhGUXi4H+OZv5DRiFV0tmdsxG ewDemsS1GY9BDBf0Z98Y+8hdKSzcf0WZMjlbr3bXDtnR7V4iHzv6doM5yzV9GhlwrCxQ2FoJ2z1/l kWXf294t03Ezi3ItCh5edVf64yEMCwRYpH4/WqluqhBPZznqkDIYBnxxPvrlf8LE2n2bDOAC26zJl obq4TBrDXHLHnmhaIVrGiQ6BNHZLqljb94xAtYXVy2cPH25AEWAS8PakKNnzP2jhyW0UUZRea3y3t uwAQ1SLl11/CWMZA4U3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvLZt-00000000qmx-3TUD; Fri, 12 Apr 2024 18:24:45 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvLZq-00000000qli-1JtS for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2024 18:24:44 +0000 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6ed267f2936so1005433b3a.3 for ; Fri, 12 Apr 2024 11:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1712946280; x=1713551080; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VnBuVioN4do9yO5Fp+To5ya+VzBTYCmZkVY34L3QmB0=; b=oGYc2iwYVguqRWbWbNCyN0oqy1ChvmxU9bZLxlUFvBTAyqg/IofIc85NZ9Ul/yuNBN XojjOnqtdm0tdtIuK+ZlXUV7gC0oBxIlkPQ/feYTSic7HHFaIKpt9Cotxsy9kUtzSrf7 3eDiEcrVHNSGQbi8hbW3S0/+qx1XJNLoq503CSFmYQLQdYRuSCzqAmPTK0u7MpivivPd oJ1YVraDMxf1wBWtLc4LJ0KFw0jKKaeyGl5K6PnObiQHN7WORe76OoLCTz7Q7sIaXp/Z 8aaSdZAdZnaydZnheieGOjgxDCRG+I3ld6wwUpLeQLrDOBrjdAAcT8H+4NKuSNcU7pQS 0qvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712946280; x=1713551080; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VnBuVioN4do9yO5Fp+To5ya+VzBTYCmZkVY34L3QmB0=; b=FqmNJXR6ftVR/yEZR+R4Jzn/BoExuactsj951YsMnQEiS0aWswQQrxO87atUn/uvHV AlRoL8FMTBYmcNwn1hy6Ne8eKKP7nMs6Aq+pb4riILlrLtpGzUsgj4gcJealmT8eiwby EltiI3PzaY/rIx5H2rtB0hTFvYbN6AGACVNN2etv1oWVApYee775UCUnx7rWQbrcTN7j 27Ljtt+8GIzh+hi04u4ThNMBZlNidAnXlYyFO2Il491jzXRcpE3L1wjQjiCquqYNf3IO jb9SXwCsW0APAsTSFQUtr0twNPdRrOm/5wK2jxVe5lCaLCknh1t13xLVzytky6how5NZ xPRw== X-Forwarded-Encrypted: i=1; AJvYcCU6lUm5sOa1QdTOMCDU57/vrab3MIw2FgDMUNxJgcB8XJzMpYdJhUmP7kGsGabI0pXYSfYH+df1dF9oWJj8dWtWjKGWRRsCDoxgJKxNZNHb1KdkQQ4= X-Gm-Message-State: AOJu0YyaP+tWdUKz98jvBS0JKumcrRfGqy/GaqvWshDjcv9+BT04ADSY 28v83qO/vcnKA3SOztwtBA/7EVAnA5QBIK3fm3dDF/MH7v/JWXq2xO/bTP73wV0= X-Google-Smtp-Source: AGHT+IGBSZ+NKU4CickCNnsQ+/kbxESLkfaeQqukqebjAC4cnyf8qidufBP0hWj5qMBvb+MfDt1C/A== X-Received: by 2002:a05:6a00:3913:b0:6ea:8e89:7faf with SMTP id fh19-20020a056a00391300b006ea8e897fafmr4224014pfb.28.1712946280297; Fri, 12 Apr 2024 11:24:40 -0700 (PDT) Received: from ghost (mobile-166-137-160-039.mycingular.net. [166.137.160.39]) by smtp.gmail.com with ESMTPSA id q4-20020a656244000000b005dc4fc80b21sm2633420pgv.70.2024.04.12.11.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 11:24:39 -0700 (PDT) Date: Fri, 12 Apr 2024 11:24:35 -0700 From: Charlie Jenkins To: Conor Dooley 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: 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240412-thirty-sacrament-db052c7fe6fe@wendy> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_112443_477891_B8AA14F5 X-CRM114-Status: GOOD ( 24.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. > > > > Signed-off-by: Charlie Jenkins > > --- > > arch/riscv/include/asm/xtheadvector.h | 25 +++++++++++++++++++++++++ > > 1 file changed, 25 insertions(+) > > > > diff --git a/arch/riscv/include/asm/xtheadvector.h b/arch/riscv/include/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 for > > + * 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 same > > + * encoding as the standard vse8.v and vle8.v, compilers seem to optimize > > + * 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. > > This wording seems oddly familiar to me, did Heiko not write this? 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? - Charlie > > > + */ > > +#define THEAD_VSB_V_V0T0 ".long 0x02028027\n\t" > > +#define THEAD_VSB_V_V8T0 ".long 0x02028427\n\t" > > +#define THEAD_VSB_V_V16T0 ".long 0x02028827\n\t" > > +#define THEAD_VSB_V_V24T0 ".long 0x02028c27\n\t" > > +#define THEAD_VLB_V_V0T0 ".long 0x012028007\n\t" > > +#define THEAD_VLB_V_V8T0 ".long 0x012028407\n\t" > > +#define THEAD_VLB_V_V16T0 ".long 0x012028807\n\t" > > +#define THEAD_VLB_V_V24T0 ".long 0x012028c07\n\t" > > > > -- > > 2.44.0 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel