From patchwork Fri May 3 18:18:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charlie Jenkins X-Patchwork-Id: 13653282 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 A564DC4345F for ; Fri, 3 May 2024 18:19:58 +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=REyp2U/UO6v4fBaQ0UZ9nqcfk45WyRsfA+F3zdfe6b0=; b=I5pywO0wlCukNm FOLgV6jWL4EQ98eeM4MdrVfUe1ODxw8IDC65mTK6+vUvujqte567iXKpR0TCrj07BG3BwzSXUWVGH ByXAb0lRX6bNwirMS2WmxUQlmlNT41PUYar4Y1Ij8uF6biSC/2P/pK8jqpq03qmK9yPMRhui1I+1W 8Zue7lKegeGnvGLU+ZriEmChC6Z9m2t+9XjWPfwNBBTqVIuYeQ33MCdq2mLMarod135gTk58Q+Fyi SNGc+Tsf4OLuXtVjd0HlIdJwhNTl7vnjvcidSqX0/tsoOflurYs8II066pIqZpZJHHzJs8jp/qavG lzKFXY0BunlI1Br6N+cQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2xVb-0000000HXYZ-1224; Fri, 03 May 2024 18:19:47 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2xUy-0000000HX3g-11Rf for linux-arm-kernel@bombadil.infradead.org; Fri, 03 May 2024 18:19:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=bC8+jsiLZWKY+UGyCwiSu3stdoXyccUkl5+IF/7wAA4=; b=K6WFjaJmEDzN0rjPBN7/FGiVyC OVbb3MSqll2R1jou37kWg8aCxBjfSukBtH9i0oMoQ5Nlbu7op6dM8oxmSRGUgHodcvuEQZulBp8lJ m6UVmEhAdgGQxv2ugAl2YjT5b1PSUmHJXATwjXlrw9XrgL1y5qnvtjNpmUj+uJ/cZJQxgpzmKKrHv KfZi6q2Rb9t0Ol9UogJht5UB+ON+zNgpUzOw43LGjGgxoDb36xPuVcTBULOccjagO0JYSI9Ym2Kqw 4l72RhsJZfM4q776FcX8nNenJ+hGZCBiHwPyP6+vLjgAMzHYkSUkLBY62EkssPYszIUuZZ8bQWMfV I0+tRBbA==; Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2xUu-00000000dux-43V0 for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2024 18:19:07 +0000 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6f4551f2725so10036b3a.1 for ; Fri, 03 May 2024 11:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714760343; x=1715365143; 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=bC8+jsiLZWKY+UGyCwiSu3stdoXyccUkl5+IF/7wAA4=; b=umfhk5U4LhoQcYAqNhY/U8HPlC/gnqKjhmdruqovo9ydMK7UCpkzgwDCeD3shjUkJG hHKI15xQC/qMZS0tJ08mpGsWpZ4HTeXsh5MUI814Snkbo7Swnlwx17bk5QZaCrfJYX8E sdicLapgUe+Dl3GQwBc9X9r7MdHul5IThQsQcJ3YRsknr/+/2STnVth3u7kYHUdx/1KW BmsN3kGgLNbqBqtPxwuZCvk/pkaaDuD2W9WGeChkGy4ywTIfbr4FneUaTG3JgtDXNYNA QKdGjvlG5bUyZAx50WRGzcFFKBIDhwWckoEYU8qAhjoE0eHq30iWpJ9t3bYvgQja4xcR DnpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714760343; x=1715365143; 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=bC8+jsiLZWKY+UGyCwiSu3stdoXyccUkl5+IF/7wAA4=; b=Nf0t7d4O43hiW+qM0lMaq2VQecNpwLd2W64e7ajGVVKARheyy8qD6I6/1xS987g/N9 ahBUuG8DKcRrhBhRNoEUl/vrdiZ4i5UqExaTZhtddQW3clYRv7nxq8Xq9FOmUctjMYz/ LmW4VUnQ9v56SVCDz9DsNUKIen/tP/5zCOyg8LsC0HbriO+kaoTiPErYnhwlUNlKdoW6 R1D84vvyrwvqROKHmGvQzKZbrZrNYZT/uArZ4CYx/dZMVR+twQC8x/KUGbLlbTItcLFY G6ynMxse9A4Jq16gIH04f+W+WC4Ryv9n8douw/1VrW28oTQHfwTDYYHN7WPFYLOoG0eD +MCQ== X-Forwarded-Encrypted: i=1; AJvYcCWNUm28ZMA73iUpJaSy6038htrHlE5yOjE/6ue07FBFNaSyVJM7TKRO/C55zvYDEhCZTuRJO4FvVtE+UW0YVRy50tdqGf0AHLfGSwZCugh58XgU4XM= X-Gm-Message-State: AOJu0YxoPgmpdVOt1+kRMmmhDPROs/X62EqY3mrNNIgcOGlxjqHNl5V+ JPcHNIjalKcafm9YVgyrE2fdA5YZaOwOhkuXxp7XJy2ndPrClAiLGRR3JUv9Hi0= X-Google-Smtp-Source: AGHT+IF7gftC9fEPBK3Bggf4eQiSggGKhcVSlVmTLAC1VCCJYp1g2BuCN/OUrXEqJOUkjFfaFq/CxQ== X-Received: by 2002:a05:6a00:a1a:b0:6f3:368d:6f64 with SMTP id p26-20020a056a000a1a00b006f3368d6f64mr4353833pfh.2.1714760343431; Fri, 03 May 2024 11:19:03 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id fu6-20020a056a00610600b006f3f5d3595fsm3355421pfb.80.2024.05.03.11.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 11:19:02 -0700 (PDT) From: Charlie Jenkins Date: Fri, 03 May 2024 11:18:25 -0700 Subject: [PATCH v6 10/17] RISC-V: define the elements of the VCSR vector CSR MIME-Version: 1.0 Message-Id: <20240503-dev-charlie-support_thead_vector_6_9-v6-10-cb7624e65d82@rivosinc.com> References: <20240503-dev-charlie-support_thead_vector_6_9-v6-0-cb7624e65d82@rivosinc.com> In-Reply-To: <20240503-dev-charlie-support_thead_vector_6_9-v6-0-cb7624e65d82@rivosinc.com> To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Shuah Khan Cc: 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, Charlie Jenkins , Heiko Stuebner , Heiko Stuebner X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714760319; l=954; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=C7F1c584ODJM4qF9TPT5kMoM8fDlOPYyEMw6010Mea8=; b=QAfri3k8PmVP8oWnQJb1YOL2NJYh4cui2R3V9rrymRbcl7uWQRGXqUcdkbJemfvjyjiKlMNx8 hUbYcNkff72Ce8B0MIDoDdfDtiaumUjXLUkJ+tfHlem018s17zddUrA 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-20240503_191905_142438_0BFB1BCD X-CRM114-Status: GOOD ( 10.22 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Heiko Stuebner The VCSR CSR contains two elements VXRM[2:1] and VXSAT[0]. Define constants for those to access the elements in a readable way. Acked-by: Guo Ren Reviewed-by: Conor Dooley Signed-off-by: Heiko Stuebner Signed-off-by: Charlie Jenkins --- arch/riscv/include/asm/csr.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h index 2468c55933cd..13bc99c995d1 100644 --- a/arch/riscv/include/asm/csr.h +++ b/arch/riscv/include/asm/csr.h @@ -215,6 +215,11 @@ #define SMSTATEEN0_SSTATEEN0_SHIFT 63 #define SMSTATEEN0_SSTATEEN0 (_ULL(1) << SMSTATEEN0_SSTATEEN0_SHIFT) +/* VCSR flags */ +#define VCSR_VXRM_MASK 3 +#define VCSR_VXRM_SHIFT 1 +#define VCSR_VXSAT_MASK 1 + /* symbolic CSR names: */ #define CSR_CYCLE 0xc00 #define CSR_TIME 0xc01