From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) (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 4578119477 for ; Sun, 21 Apr 2024 01:05:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713661507; cv=none; b=P3fTi/l74W8KOC9YfmPPb4n0DXiTu6sY13jkCsMSDdW1Ti8dwOkSx+CGHINflESNsLZcGBD6oUL423YvjFFChyEZkxoXDcgloEYE2jx97mDyihvyJKWC4PnZWaB7/hrLECKXbNGCnP5DRfHFgJPZTMcJBHW0zoYdNQwYZTbP9cc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713661507; c=relaxed/simple; bh=wcB/ebDhkfkPBVDQxoUt3AjUlhzpSXzz59SF5DkeLyE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZV0nJSy6irMu7i7alOAxQFdxgG9BOlOjrAuHAepigE3xh0CxS3XW4dD0J4Tt33Pej0xM4kYODS7YTnx8+HKylGZu26OZY7mCMjdu1hrlivxW1VbBR+qRby5WscZMN8apsP5J1sMtwj4BHq3dB2jw94f50+sJgCB5NfG3ctMVhvc= 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=x3W1c7Of; arc=none smtp.client-ip=209.85.160.47 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 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="x3W1c7Of" Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-22edec341c2so1781403fac.0 for ; Sat, 20 Apr 2024 18:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713661505; x=1714266305; darn=vger.kernel.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=x3W1c7OfKrxYrdl53QKhXwkpvo6byzXT4tobcLGo5HPyo0nQzHPhJ0AYOu9kdhjCuw Ce7jP2bH+UdwZz9vVppnwO2Q9QaSsOPfKvIwyt14x6nYG9OKYXq9w+fZ83iKGk6/VwqA gAo2dZv3VyPWGp4BRU/m3V8FImRInf0xv5Xi3gLIJ25QWEg1DPJ99apSm6RCEedbVZk3 QySFE9HMgMaHdxUSdBQcaHHNPuaxUE5gAky25XIpJ91fLPFeHKPsyq9xiy0nOSi9o01C a/RaCJJ07BS4ltCkZBim7VUPTkz0a7taT7XsMIzASa7cnh5/Tnyo0BbiMkmI5v/8wzoO 2HKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713661505; x=1714266305; 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=V5xuPK5Bz6yytRxXyMKM00QCabacxRLThgqq9gYy0vpmUDdwJOEYwkvuKfph1Tekkz xKozyqR/9Y8d49CTso4fGFBlN70kdgOIPE+eJQTDy2EpBa/PPIIp5dYCheOydyNeS9eI Qeb7jPrp52fqx7pRzgoOuL85DvBQ0p1OWbGgdAZmWbTbhHcMdnSmN/Zh2HacX6TLYGPX SrtVgwKb3nuygqaJgK72ju4t9x9jcG2naxSI1nfuERsE5CDzzHbCXTAAJyXv0c2gAMM+ DxoK5TNJ+IAIdji7Gpk8tkU/mMChNW11TPVtCiHmFNMxtRfTID/6tcHAb4/ydsiCFivF TXvQ== X-Forwarded-Encrypted: i=1; AJvYcCWwypHPVeWvZproq0qvTWDnaz+aD0RQk1pcaef+NW2FmIgp3OmNqtfizOKcLmeb4z+Lx2dtoZc9TM2n4ZrayBiQEiNc1WaTaBNIoHfA X-Gm-Message-State: AOJu0YwoYCv2t3Mq7fm8cDQfjyA25eS7UVh3EpgS9CalhCvpDkPcykqK 7H9E3iWhI0Dvh9Hmcfz/YZj5BgTo1CtRhG+UbJk77fZQiX2J18VUxeWWUlxhe6E= X-Google-Smtp-Source: AGHT+IGbQ/vxSg+SM01gknEBQRR/q49/3qC6z4/xjDMc4YZpeoH8/vtpKwa4//R2pCwzOVNHIa6iZA== X-Received: by 2002:a05:6870:9a0f:b0:239:8e67:6f10 with SMTP id fo15-20020a0568709a0f00b002398e676f10mr5008737oab.30.1713661505412; Sat, 20 Apr 2024 18:05:05 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d6-20020a63d646000000b005dc8702f0a9sm5249627pgj.1.2024.04.20.18.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 18:05:04 -0700 (PDT) From: Charlie Jenkins Date: Sat, 20 Apr 2024 18:04:42 -0700 Subject: [PATCH v3 10/17] RISC-V: define the elements of the VCSR vector CSR 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240420-dev-charlie-support_thead_vector_6_9-v3-10-67cff4271d1d@rivosinc.com> References: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@rivosinc.com> In-Reply-To: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@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?q?Cl=C3=A9ment_L=C3=A9ger?= , 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=1713661481; l=954; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=C7F1c584ODJM4qF9TPT5kMoM8fDlOPYyEMw6010Mea8=; b=7jmS1W1m0Q0AzX4wBIry9EylCG+Y3NoCPBcfRTlo9XfCGTiKUGeLKVQZD0sKpe6MXP57BC0/G 7k6iLclC9/sAQ0QerwrjVwujrLIbftuilh6gclJQQmbPMW8YDHcSlr5 X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= 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 -- 2.44.0 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 31C1FC4345F for ; Sun, 21 Apr 2024 01:08:28 +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=3wKwrLcFwyUZ+gRtqqvPnkMBCIGBPb4zRTfFMAiAy2I=; b=JA0Vgmj3kMsgxm PN0coLlpqm9MrVWf7dPTupdUw9JWSRpFz00nelO/gRmHrBxzE4doVTBv+0PIJBddISK/I8QZQEJkz FJ30L3vPOpHiT+pIIdS3cZgy70tBbm6ZUV3t+mkB50mdL9oeWzWKgdrUxkIn1BY8ooHgB42boKszR Z3Mnz8zKxg8GuUgm/Fqpu+7kWw8kHkJXRJWReMglyCXMpTvnIbImfcgmMXqi6tECMLvlVaaSATuwe VkNOiuUsqI0LnuVEP9Jsyv0USuHblyojz8Z26SwQ6v58ilbQ93XEgAytmo4CgCWfSrLHdTSPzY25n Z3Z71bLU8CViS+OCCiMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ryLgs-00000009YXH-2TXD; Sun, 21 Apr 2024 01:08:22 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ryLdk-00000009Vwv-05Ua for linux-riscv@lists.infradead.org; Sun, 21 Apr 2024 01:05:14 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-22edec341c2so1781399fac.0 for ; Sat, 20 Apr 2024 18:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713661505; x=1714266305; 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=1HMBOuMK9pFBV1p7a0IrcTYGZzbYKs6/6znEEZHQORy8dQYEypFJbXJ35dHcxX7q/j NYdnA3L3IS028EpnqjEoSVpfx4rBzAb4ePBoHRWd9fdT6qh8cZupLP2tQjbB4QqOmYen oSKZQN4828cdLuHP3RbB68lP92TpBK3HJ52ev/eUahALF0MUin9XcAGk4sYs4e+PDrsR 6ggsk4MdBRHqqArKkW+1Iw+mZgYk07fxMwCdkR0ML/b08dN+jmAjGYNpXutJz48vq5Th 69YDFsBLT31S+r6+2yU7W899Z393YoLqUKJR6vjGKX4Xr5AHmZD3BkzY0rae7U6luluP F3sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713661505; x=1714266305; 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=ZDhuQ4m9B7wW/5eXn3L8+0B78pjdKIbUNhrcDASQdINtXy2nLr761+cmOn+sN4PzCE q2sBk7tAdEpZ2piJQa/kiLSXId8Kb3r/Y1HqOfaO78d44xAsgmR+QwAMa7qYaWPO8hxe nrzZEBjjOmCDco5yxm8vhEuKShabpb0X4Yq7bfvB+emINU3dUZtk8Rnu7pNe2GyfwpDH iSrPZi5X0ByI6Dc/n1K3MpcGnri4bbvXrKUV30T9XEa2r25bWtkqIgfS3klGm38qUN8a ZVhVfeyQEfJZ+LNHgclYN28f6VAJuhSS88Xb3gm/hG9ylF/U3OihBpaEInykcgechBkr tMOQ== X-Gm-Message-State: AOJu0YyHYFxA8QOyi8La2C1P+EkU+v5cRegtJZy3xrq2ZQYimmDSmxC7 8LwVBlMgsK2gaUEkhI9aG2o2VIOWrJL1spVt3QWFM6gELaXJ8hQjJAviLch/szk= X-Google-Smtp-Source: AGHT+IGbQ/vxSg+SM01gknEBQRR/q49/3qC6z4/xjDMc4YZpeoH8/vtpKwa4//R2pCwzOVNHIa6iZA== X-Received: by 2002:a05:6870:9a0f:b0:239:8e67:6f10 with SMTP id fo15-20020a0568709a0f00b002398e676f10mr5008737oab.30.1713661505412; Sat, 20 Apr 2024 18:05:05 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d6-20020a63d646000000b005dc8702f0a9sm5249627pgj.1.2024.04.20.18.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 18:05:04 -0700 (PDT) From: Charlie Jenkins Date: Sat, 20 Apr 2024 18:04:42 -0700 Subject: [PATCH v3 10/17] RISC-V: define the elements of the VCSR vector CSR MIME-Version: 1.0 Message-Id: <20240420-dev-charlie-support_thead_vector_6_9-v3-10-67cff4271d1d@rivosinc.com> References: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@rivosinc.com> In-Reply-To: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@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?q?Cl=C3=A9ment_L=C3=A9ger?= , 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=1713661481; l=954; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=C7F1c584ODJM4qF9TPT5kMoM8fDlOPYyEMw6010Mea8=; b=7jmS1W1m0Q0AzX4wBIry9EylCG+Y3NoCPBcfRTlo9XfCGTiKUGeLKVQZD0sKpe6MXP57BC0/G 7k6iLclC9/sAQ0QerwrjVwujrLIbftuilh6gclJQQmbPMW8YDHcSlr5 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-20240420_180508_459954_F6B8D88B X-CRM114-Status: UNSURE ( 8.23 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=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 -- 2.44.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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 A723BC4345F for ; Sun, 21 Apr 2024 01:07:05 +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=IeRvCS1YDqO7lw A1exAOPnJrfpCur2mAxHl6ALHa2Djp0TumczvJLBhyxg4+8TBV5SmEWKFB6K9K9pCsTQ9lqTheATB tWTDm6ZTEUGCFVhzYengY/uDL/QdPPaDuCnJ5yjWteUfjK3Hojvpq4xFYjt/hcErTulEnLzxLZs99 vtoJD45/93rnf5RVopT4ILN3Wc9a5k5yl/PrIbgksCaB6/FYsMSkfI5xhovDgGYVQhPyDB7oSRaAC k6BCaWeZBAI4uHXG4FuboufwCnQU93WKLSph8xegvQmfHn/2c55WrgZXaEmJSRq6hFgMrfXlqkZme vZz8lpfh62oXMcM3V3EQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ryLfQ-00000009XIl-1tfd; Sun, 21 Apr 2024 01:06:52 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ryLdk-00000009VxG-0A03 for linux-arm-kernel@lists.infradead.org; Sun, 21 Apr 2024 01:05:13 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-2338483dd76so2060372fac.2 for ; Sat, 20 Apr 2024 18:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713661505; x=1714266305; 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=1HMBOuMK9pFBV1p7a0IrcTYGZzbYKs6/6znEEZHQORy8dQYEypFJbXJ35dHcxX7q/j NYdnA3L3IS028EpnqjEoSVpfx4rBzAb4ePBoHRWd9fdT6qh8cZupLP2tQjbB4QqOmYen oSKZQN4828cdLuHP3RbB68lP92TpBK3HJ52ev/eUahALF0MUin9XcAGk4sYs4e+PDrsR 6ggsk4MdBRHqqArKkW+1Iw+mZgYk07fxMwCdkR0ML/b08dN+jmAjGYNpXutJz48vq5Th 69YDFsBLT31S+r6+2yU7W899Z393YoLqUKJR6vjGKX4Xr5AHmZD3BkzY0rae7U6luluP F3sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713661505; x=1714266305; 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=S2dnyP2+ua5xPp755jxks7wWkrkULcVEY8krd50t7iepXmV6IpVofpZBmyRZsWHA65 cVgFVDtb4akf9u+OKoQNeDgXacKm6x5q/VQhhbKzdU8uGkoPjeniMFjiFp3WYnxD7vGB szCAHWpuKAWR/9UCEcUBUd/NN3VMZrSRfa2kIjLTzVgPHG7+2UNh8LOWKUlT41LkCqaC d/M11u+FtVAW8pTYOwFME3FgWRmcHt71Wlb/od58IhuT1Uz/DOUSkjRj1/URg1B1xtcs qXI3Zt1tv4JV31fK3/Ue0DkXK/J4xIB3Nfbra57vlgfMi+ct2f6B+Bk5/o0RRDPrIzDB Q0ig== X-Forwarded-Encrypted: i=1; AJvYcCWbSz7pfsvaoJCbWIuHmXlzAmZ8ru1qtHYFg3J96DCpNMtxTBcoy3BZSqHhfo7nvJGGROwXvtmByTdQCXAfztHqcZTJyFkHbPxe2MN/bdG67pUDPxQ= X-Gm-Message-State: AOJu0Yws/ip2AXCqLHMuTno+rSD3zQiOUyVUYHYoxiXkfVqI4PRwLOAy 4WzBHF0ACwdls743BFHrHQbdmUo/JnrxxpTRu+iZvIJDr8uRxE7IG3EXqdYPhr52VkBReFpski5 x X-Google-Smtp-Source: AGHT+IGbQ/vxSg+SM01gknEBQRR/q49/3qC6z4/xjDMc4YZpeoH8/vtpKwa4//R2pCwzOVNHIa6iZA== X-Received: by 2002:a05:6870:9a0f:b0:239:8e67:6f10 with SMTP id fo15-20020a0568709a0f00b002398e676f10mr5008737oab.30.1713661505412; Sat, 20 Apr 2024 18:05:05 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d6-20020a63d646000000b005dc8702f0a9sm5249627pgj.1.2024.04.20.18.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 18:05:04 -0700 (PDT) From: Charlie Jenkins Date: Sat, 20 Apr 2024 18:04:42 -0700 Subject: [PATCH v3 10/17] RISC-V: define the elements of the VCSR vector CSR MIME-Version: 1.0 Message-Id: <20240420-dev-charlie-support_thead_vector_6_9-v3-10-67cff4271d1d@rivosinc.com> References: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@rivosinc.com> In-Reply-To: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@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?q?Cl=C3=A9ment_L=C3=A9ger?= , 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=1713661481; l=954; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=C7F1c584ODJM4qF9TPT5kMoM8fDlOPYyEMw6010Mea8=; b=7jmS1W1m0Q0AzX4wBIry9EylCG+Y3NoCPBcfRTlo9XfCGTiKUGeLKVQZD0sKpe6MXP57BC0/G 7k6iLclC9/sAQ0QerwrjVwujrLIbftuilh6gclJQQmbPMW8YDHcSlr5 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-20240420_180508_468854_4E5D8FC6 X-CRM114-Status: UNSURE ( 9.71 ) X-CRM114-Notice: Please train this message. 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 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 -- 2.44.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel