From patchwork Wed Aug 7 00:31:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charlie Jenkins X-Patchwork-Id: 13755559 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 AAC7CC52D6F for ; Wed, 7 Aug 2024 00:32:06 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QDwHR26Vp3Qj0oIbbERNnQrQ9hF+kq5Wrx6oTXmyRJw=; b=Ay+eD8YImx84Zq LQ48n+4UwevB1LR1TBFy7Z/DvFmRX0gXPq9Pdxk0ZfiBxRD3eBVulm9Yh1PxjgphC4XXH7yjlh2TV 9hU6LkJtvQEP72BldmSvE5bShuv8a4l3+ODCRyN9zWf/tRR2ilYmjWWnelTkHpiaJCIc3UCB+Omvx rZf5eF6+WNffCsPY9Lzq9UCU7egLPTzT27JijGLHaNRqajGLnGJo/dsg61pHm18NTu/Lm+Sd0XyxH ROLqPIp51u+DHwO0AaDCCAohf/3lDjbsOrUHA1H7l9ni9w6jYgbqX8RFF65xRQKGUNkcwkqsOpTMN VNwE6NjSnZ4xat9sWnEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbUax-00000003Qwc-33FU; Wed, 07 Aug 2024 00:32:03 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbUau-00000003Qsx-2Qi9 for linux-riscv@lists.infradead.org; Wed, 07 Aug 2024 00:32:02 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-268eec6c7c1so786256fac.3 for ; Tue, 06 Aug 2024 17:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1722990719; x=1723595519; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=I6vSC44jl4CdBSHHJd2q6Sf8U8Y24j++yUJmo2Jtjkw=; b=fruJNh86PndtcCQ9KUQRRb2C6jM1kcd/Y3+GKwkwJmbpURmXTtcC9A+ybeFDKtlhSe Pp2CgeYHCNwrthywFIO3im20iL6GjeFSQeDEwaKNMHIT5B7rLscvo+KL0A7QMDnfXIKU 1YrAKW8iPrc6Uh302I/CNkoQjzUiynBLjceVGuRFsiw1a5auIhPF7JcvDa3y0jecl11F hNaUmhza5ptyqZzRWwEJhLSGQURSoB8QmawKaSTDlg80mjQxPajKDg2unlPmvDRkZeEf QE6Gen2Kz19iDc9JCby8+LSEdtphNFu5EfeiCA3umHvRTNOdXEEmnPWidZa3zlzMDZuA Bp7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722990719; x=1723595519; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I6vSC44jl4CdBSHHJd2q6Sf8U8Y24j++yUJmo2Jtjkw=; b=cNZy0b62pRnHx7SM1TZtOxoCVmD0EzawALYhvJuLjliqzYwdzCvqQz21Ol15n3PEy4 LkzgOIA+SQ+QykkWxWdXKNwFR47McQm91pM2ka2Jt37WT+Vo63UUjsx5YGq7I1PhvhX+ drbMKJa7RrfnkWuaZWgvFgo00VjZX0u/aiUEj/F5MWAgnTcysIsaNb/v0cxzygD4FUkh TKVS7Dn3p2knnZVv+NwuQCyG2+ZhW1RcnO7jNCWDgtTwissQShGBdUfTEcq1dr/C8L2a o+0BpMQGRzMS+V/ieIS2EC3CoB13DkfblqL9KDPoKGRk7Py1XwBo5ScCDWuSG3XkQkbD eddw== X-Gm-Message-State: AOJu0YwqJS1YoB5rnWU8/wFgweWfyDYtJcXSBPvF9rVqBSChwRcFQ/Hi FhUU3eGqhSbgnGoAv2stl9EJ8PkqhePk6aXCqys5A/OrQqZb6JrzKek8qTza0FU= X-Google-Smtp-Source: AGHT+IFnj3kIuRll1qVruAYZ27yJp57qLFZHBjlVTk6x/guLrFPnuVwAodBd5IFbDfmkbBhevIxCJQ== X-Received: by 2002:a05:6871:5b2a:b0:254:8666:cded with SMTP id 586e51a60fabf-26891d3b2acmr19881342fac.11.1722990719025; Tue, 06 Aug 2024 17:31:59 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7b762e9f5aasm7476174a12.6.2024.08.06.17.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 17:31:58 -0700 (PDT) From: Charlie Jenkins Date: Tue, 06 Aug 2024 17:31:43 -0700 Subject: [PATCH v9 07/13] riscv: csr: Add CSR encodings for CSR_VXRM/CSR_VXSAT MIME-Version: 1.0 Message-Id: <20240806-xtheadvector-v9-7-62a56d2da5d0@rivosinc.com> References: <20240806-xtheadvector-v9-0-62a56d2da5d0@rivosinc.com> In-Reply-To: <20240806-xtheadvector-v9-0-62a56d2da5d0@rivosinc.com> To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Samuel Holland , Jonathan Corbet , Shuah Khan , Guo Ren , Evan Green , Andy Chiu , Jessica Clarke , Andrew Jones Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Charlie Jenkins , Heiko Stuebner X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722990701; l=1045; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=M4fQyJxhZ7NtPnQCPQfoncg1fbWtYe6qmsOGHrd6z/g=; b=iKtL+WyQGLyitjyGHlYu61BfGzlSRVUxwmNxH+dUMij5Yc/9iOxYeYmj/uiQ8K8XXvkTGyPSs /HJjj73aZMBArTPioQCOvQvyG6MSxbyqfoWVpmBWkjzkt1irCHP5J83 X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240806_173200_714616_95E507FD X-CRM114-Status: UNSURE ( 8.84 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The VXRM vector csr for xtheadvector has an encoding of 0xa and VXSAT has an encoding of 0x9. Co-developed-by: Heiko Stuebner Signed-off-by: Heiko Stuebner Signed-off-by: Charlie Jenkins --- arch/riscv/include/asm/csr.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h index 3eeb07d73065..c0a60c4ed911 100644 --- a/arch/riscv/include/asm/csr.h +++ b/arch/riscv/include/asm/csr.h @@ -300,9 +300,14 @@ #define CSR_STIMECMP 0x14D #define CSR_STIMECMPH 0x15D -#define VCSR_VXRM_MASK 3 -#define VCSR_VXRM_SHIFT 1 -#define VCSR_VXSAT_MASK 1 +/* xtheadvector symbolic CSR names */ +#define CSR_VXSAT 0x9 +#define CSR_VXRM 0xa + +/* xtheadvector CSR masks */ +#define CSR_VXRM_MASK 3 +#define CSR_VXRM_SHIFT 1 +#define CSR_VXSAT_MASK 1 /* Supervisor-Level Window to Indirectly Accessed Registers (AIA) */ #define CSR_SISELECT 0x150