Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp166784lqp; Fri, 12 Apr 2024 13:53:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIiKY0gSWwOzC6ixcKH9Ek3e6JxRdaa47oO+gnN4oTSNwslrUT0rk43qnPLKqhWKx6rxr4/cyGvbogWVgCp6m3G2Wo3yKd2DLFzK8eLw== X-Google-Smtp-Source: AGHT+IGIW+4vAlPX55BkKiB3vcNu0wE6AzneT1Q+PgEL3LbH8jV7w8ac90ZZNRHYNdEpMi1LI1x6 X-Received: by 2002:a05:6a20:2588:b0:1a7:53c1:ad89 with SMTP id k8-20020a056a20258800b001a753c1ad89mr4909635pzd.53.1712955199356; Fri, 12 Apr 2024 13:53:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712955199; cv=pass; d=google.com; s=arc-20160816; b=pLZ13bjt4wvkf+P0whD+8TIJon2Vs2wF5H8rsc/jfTf2UG76x0Zo4vhCNt+8W1L9Zs 2xiuTFeXN8VXMLalihx99mgrb/wUoC70IlIaQmO1+gypl37ERMLucFxtM0xYag79mMRL GIEtGhJQtEhC49lJ49ksqC1vheWLCOfLINOSrO72vkAuCbtz+SGFnmALhcabnuO2UW/X txqZBPmpmeiNpG6yxkbGNbVekKkkU8BFG8CD6LpkMsWDfrDrY5k+csXHRlirVZ1F62YJ dCXYWPZA9pkdqxuZnkIJEMRcu0lKh9pWJWvmcznRdDNFmB86zYWzmsKi3wkrH7kQxUzk 49gQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kuI1xDSDY3wZqRxOoGKgeFXQbOBRCo2OPPgj3TfcWU4=; fh=+HKum2OO79rysS6Fj0A48fpDJV/D2yWNbWYrAw7ir8M=; b=HFYh+h1ZjntoSVZpoJB8pXSf5W43i61eD0tME9DBQONKrScQeNs7U0ODgEckAKRyCk dZ/m4bl3SVYSm7X+RdU+X7CioPj0qdFJISER7muDwA/pNHbJigaYqGAXoBNyPmh7Ir5P 4BZCcTkQJoGR27gd1CWxPmdXzkaDQ8FcfOI+u627Gvte4Qh1MLZ/XYkhNzecqHfiJIYr /gpy1XNemyLdTT3AL5h5D8dQ2mcsdk2SBWKQn/Dyixm5psTynPwUxM0LClaFzS1FdviT wQJjflUHvH6q+lfm3SMNuJN9Q1x0R2WXj6JATTk9/mRcEvBr8k2bxZp/rTgz2s5jkKy/ japg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="JOEhex0/"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-143332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143332-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p26-20020a056a0026da00b006ed7684302esi3953846pfw.98.2024.04.12.13.53.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 13:53:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="JOEhex0/"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-143332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143332-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 05602282D1A for ; Fri, 12 Apr 2024 20:53:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EE0E3F8E2; Fri, 12 Apr 2024 20:53:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="JOEhex0/" Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 377F62F875 for ; Fri, 12 Apr 2024 20:53:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712955189; cv=none; b=K0Jaw1uZl+ZpUCrAe4EG8xXCpTKMkDXqCkDk3CwQo9ViFJFRXkdbXRDj0yj9zFewHXAaM/bbU5tlJKaCpI+MgF1+fc41+U7iT+WI8o+VsjHO2Ch+T3X/GDEec0xqp2MVmm2W7965sQSEXgAgY3vFotocjaE+pE2U5U96PCnRsDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712955189; c=relaxed/simple; bh=qGcc/rgVjEIkz41rcNhQCOoE29RUhq2mJkMJFN2mQyQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AmbxgWgcI7cQdcGo1TpJMRjmtNReK51uHEhUS+dShKYKhs0j6qYVnw7upL9Ok8YGCiOqzgmq5nUIAa+v2GImpPLeqFLsEQS1NdJWt+aTftB+HmAOK6O6Fav6hWnJ/uQSt4sm8MmFmuGQifnyOahogDGaLkK9GDzfDhX+g/JHuys= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=JOEhex0/; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6ed0e9ccca1so1272671b3a.0 for ; Fri, 12 Apr 2024 13:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1712955188; x=1713559988; darn=vger.kernel.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=kuI1xDSDY3wZqRxOoGKgeFXQbOBRCo2OPPgj3TfcWU4=; b=JOEhex0/s/ow7z4CMqiadcfhvIHg0Uxi1d5Z7kkTTfVP76DW/9/u5zWsbmxg16pHAQ dh3M0+xNPwCAXJPUZEp49nhrMIrqSKRfh6YvAnQ4ox9f24RzckPEO/mI2RCOcZxTjGeW qZ1OhXi92XV+ThrCYM23ZigHzGsDY/NTB/6/3Yp2rEwZSYK0t4ImGWxjSIId0ZpwvcNf EGxxoCHdekz6IxC/V/QZLvv68+JCmP88cxt6ftcnJPWm/LI9QixucKkf9u6NtYlkxkiz oHiHNLBrxrvyII4YMOn3hZqbaF79PN64gqTN+K06a9UgnxJLcycQMxoOPI2d27eS9Szy rKPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712955188; x=1713559988; 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=kuI1xDSDY3wZqRxOoGKgeFXQbOBRCo2OPPgj3TfcWU4=; b=Lc2HdwMMiBB52tNsWhfVQkBJCu1naZCwYqKBZesEqG58jZ3OhHVuExHTZ9LeY3TKdN ejEVvWLHWSxh1e40nfTzq2CRDDquLpJVAfCSz7PbtL7nuthVIJjnB2Pc7nVrRWOHZ441 VUlc8dlKjKB4ZqlBdyJ/4hLQB8fuTKYVvkl8pe4DXuMSoZ3rAS8CYdFN3HJx+4cJuODP TDECvRy1MrU2ubGhO6bLNtG0wkAG4m11z5UXQlyCMIKTCSofF0KPN8DHAxmD8N+VqOMy SeiQUfA9nJHzF5RT+XOH3ox7nFhWmZfLuD1aDLo8xpjFSKJOygtm7t/nfJBKqjdHzKlx 0Uvg== X-Forwarded-Encrypted: i=1; AJvYcCW0zd5HgfgGsynYvWLuPjXt7JxyvFt3ZzOFof62HR9MnN+7TvEE7hMvO0k/2yk2WQJ2T0235p7wioGvn8Juv4Gj2xX7z8IaNIgAvJYN X-Gm-Message-State: AOJu0YxRKckqvL7+jtOkAxib8QpP8WQj6RhJ6JWg4izl3znn3HGwjYz6 KyRv66FRgeXo+0FPcBlhuM1mfYHG48gzXe1VQfDjfMBRvGMCM8ya3je7MYOg0c4= X-Received: by 2002:a05:6a00:1798:b0:6ea:bdbc:6a4 with SMTP id s24-20020a056a00179800b006eabdbc06a4mr4030047pfg.13.1712955187671; Fri, 12 Apr 2024 13:53:07 -0700 (PDT) Received: from ghost ([50.145.13.30]) by smtp.gmail.com with ESMTPSA id j16-20020a62b610000000b006ecceed26bfsm3264351pff.219.2024.04.12.13.53.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 13:53:07 -0700 (PDT) Date: Fri, 12 Apr 2024 13:53:03 -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> <20240412-displease-sensually-33d91fc3fe63@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240412-displease-sensually-33d91fc3fe63@spud> On Fri, Apr 12, 2024 at 08:00:46PM +0100, Conor Dooley wrote: > 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. > > > > > > > > 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? > > The original patches have his sob and authorship, so I would at least > expect co-developed-by. Perfect, thank you for pointing me in the right direction. - Charlie