Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp2124lqh; Fri, 3 May 2024 11:23:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXIqt7FqSU/iM9tSWXqCoRLs9Q4nFbp8fIVYvpmO/ADXgCm0lP/bRwKti6lHvmcVC8CBtG1Ae6jj5CaUL00K/vbvTyDjCbv2Cyw4AZk5g== X-Google-Smtp-Source: AGHT+IGbx5usdTBz/EMR3L+lFh1xBFn1L/VCeStAOYWnzEL7LybkcwFfFNIatqLLg7ffUTQoxkto X-Received: by 2002:ad4:5c62:0:b0:6a0:ac0f:a59c with SMTP id i2-20020ad45c62000000b006a0ac0fa59cmr3898722qvh.46.1714760588735; Fri, 03 May 2024 11:23:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714760588; cv=pass; d=google.com; s=arc-20160816; b=zvVGFQ4R+ksAY7WWYCU8MF6qgAHcC9vnY/OFannvq93iPz2Ond3Rke/6D+RKIbYYgV QvtOp7SId6z9mGtQKRoBQD1Xu68q0QCSWSDJlyPEB1HgLbY0lHTPidVKic68yPXbwmRe KomUkGvYWWbr0IMwTUYLmi/DeIa4tB3qnc/BiyntaykOniEDjoM3TJJC0Hv5wzNnUEBr ghK13RPRL4PJoPPNqH/WAoxz+m/nZFTfwzRq3ur3yXmKLUJbbV06sj3y+nHwCxcrUgLQ R6ze8a48OWXit7woNCJDjnGNK23/e5co4kDlGniH1wpTh9Kxgyw7pptI6cawKyM6u4pS pE3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=bC8+jsiLZWKY+UGyCwiSu3stdoXyccUkl5+IF/7wAA4=; fh=fBYoNrnTQNFZKHfeZjpaMnhogNc5f/6dp5+Grw8O1/0=; b=UEOm1ccxHZk9KEd753ioLN95gjS7FbKy/s6LodJjD5q1L47qDWIMVmhQYKaqrr51dE nRBthpSAZqXGvOf7mA8HyIT/6m461h41tFp+Wn69GV8JEP0Cq/LfrR/ZiD3uvD8cGf0/ VQxuxy+DS3aCpFWbWxa4oo5aLsGnHjWVhf0UTCwqYuv4ssmVVY/Y7TQwklM0zTxgP6wt mAcGKg9aHBEdl4CZzggfcgbN/ZeaW43V37I/mU+BT+RcV4cXRPMfXXh6mmbWRzL7CowJ J1HXubSC0yF21A7bgZ4lTz1RCmDURTV4e28H2BWvjW6kaV9WEY65+nWXqkRgNPF1iUaq 1plQ==; 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=iJ8F2e4v; 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-168039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168039-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gf12-20020a056214250c00b006a0cbe9c5bcsi4035140qvb.519.2024.05.03.11.23.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 11:23:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=iJ8F2e4v; 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-168039-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168039-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7687E1C21533 for ; Fri, 3 May 2024 18:23:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B58615B0F9; Fri, 3 May 2024 18:19:07 +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="iJ8F2e4v" Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 01D0815ADBA for ; Fri, 3 May 2024 18:19:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714760346; cv=none; b=ZQTiR9kTWUbeP1XY3sQ7OOhDKBIdxxUlbCskvCH1qPoOKmsbhoyEgrTw6OaerlzYcsx22QUojUppj9qEOCiJFYEj25Sbci2FMRneK6w/Bh3MtlGDhH8xivyCe4lzN+KjfKp8NNe1ykEOZCsZ5jVSBlncEFSsfKW5G3ww9LvID5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714760346; c=relaxed/simple; bh=wcB/ebDhkfkPBVDQxoUt3AjUlhzpSXzz59SF5DkeLyE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=U9jLl3kRJHJPUj4WQSEQiIdkDY4yYqbqW54GLn2JCq/AjLi4bgyda+ItLfi+ZagzVE7j8Fzs+W3KZxj6uI52K/v8GVpIi3MO12Bs2ExZiAUPsQsQfqeOioDoSXI1kQJBOaipyg2KYau5uNVN5VnNDF+G19x8SodChtvmlXR3NdA= 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=iJ8F2e4v; arc=none smtp.client-ip=209.85.210.174 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-f174.google.com with SMTP id d2e1a72fcca58-6f453d2c5a1so2852b3a.2 for ; Fri, 03 May 2024 11:19:03 -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=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=iJ8F2e4vTS4lY9LLj/66eS94/tGJMg16Y4r9oadvooy/STIUVKOI+lx+AcwyNva1pE 4UdmtE4URe/KzESsyeHl93YsNTkpGOl2aDn1gXz2iNq9FJFNjzltpRIiQyNaInghDkHK laimliVcAIoKWldzipp4lQmCeflRKeZV0UyaYeSXD2uxDDMbShteB/LgjLkb6iDOfXfI yVh+l/LVE4vk5+n4BmStuxsLIcl/VACs7OYaFgechostkcWSs+BIT+WHUz9zoIKMTDHg rBDImFZydLmUbo3uy/k/p7Ky3QBK/xUchF4XqkqemP+iqedzRSHmOTALLqKbl9fA2qdh v5gA== 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=BuXh+fJ8qQE3QW0SdEe4ooGIXf0w5m2bBx9GabTX0mptrdEIwkm0say3CN/o1zgnop 8nGwz3By+I9hvHx+y+xhVvshOZ2XYFCM9Yorf/h2l4Uc/Ji/V9BjnQtikm4Oa23BS+f3 YtW/I0ygM6XCiF+QHFSogW1TmmurHutInII6iPTuXaEaQd1T5KtlmTOt2dfJNjxCFBrc 50SWR04+lpva27F9ET1cWqtxhrPLQsr5xED5+JnJNi2Aoym4TZkl2ITw/8LH3RrtYn4q kv8nxX83KENREQig5gt8MPTZkGIOjfvqldHTPy1OT2eSvlj1DZQWGmaJm+Vjl78MdEnc sL4g== X-Forwarded-Encrypted: i=1; AJvYcCWs4JFl1pUJiJ7J5lJO1drRsU9ZXU+jh+kfRngvPaIySKlpe6u8SxugjiKDmPhlkw1SCJd2+Ny/BEf20Vxnu7FqhzJLJ92aldrRS62p X-Gm-Message-State: AOJu0YymgKbwy3gvi2UeuX7fxOXlrX3EQ65CNO7FJ6fz+CUt2UtJAaiE ezBbYeVeWU0OMazJAk9lQFRNzdlWF3MWoy/Ir7BPL9qlXGRYq0KkdhanB7crmyI= 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 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: <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?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=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= 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