Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1833946lqp; Mon, 15 Apr 2024 21:14:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVmMt+9u3bM0bP4omHPeUcInJ0Rp800dYAm762QZEJukjrGgc3PTkqd72nwsFYza8anFfAeacX3X9uT3RX2pJG7AFmnHkwabNauNq4ZBg== X-Google-Smtp-Source: AGHT+IG6f2QNURut52PNu9oYBMnL+2BSAU39hY6J0CtI4+doHcgwp2i0vRqcYT68udG1SevS3JoI X-Received: by 2002:a17:902:7248:b0:1e5:1071:5631 with SMTP id c8-20020a170902724800b001e510715631mr12684835pll.65.1713240887753; Mon, 15 Apr 2024 21:14:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713240887; cv=pass; d=google.com; s=arc-20160816; b=DYAXyLLZq/Erqr0tlg92R+HkTLwiFR4BGNomVa+oP9MLXqP351KmbwrZyulJGJbgWG 3rMhj+lJflvpCiNw6dub25KSU9PdDa0RS0O1bYo2It3Nz+PZ99N4EkGq1rD0KbEosMkV TUpets0BLfejcQFUGuz+KmJ41FOqXI0RuBX0wl33sXLwCKu+R8yg0Kw2aGvW7XkgifNx LFmNJ3rjehQOxtC2wCHVz493YoQerTihPBKrqSr6nVeeWi/D6jfTcslcDAXeR+NReg5o iHZqSxLXi54dkzLZ3D7WuoYmxNOrCM5tLtDrB5UQ87c9QxxIsvvZTN42HuBMdChpoF4A F9uA== 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=4BxZT17zIUMziT08M/cBnps3d4ipcERB7lNgHpJ/vsA=; b=TlSNQ/2DVvpnl9YRvG+T9YLgbyfR1WQYstBONRep0uhxXfufUzjn+R6t5kgYhN9GKj 0zvuE4sPUX1qiPSj5z/+zjGEUiRR1y7t1B/bRnLscuQp5Z7Ge+a9xdzPMiAgaa0yiO2d +wXr0eZsSNf8jjrkvtDrYsW7WD0EVi2ZOM73fwKA/M+29RJf0xzUwC8Qa8gQvtsyOlyY dMo6bRVIe1S/LtJOsfcJY1KJwFAp/tSMovF6Xr/UybP9uQPkmqI+xUIi5jG9Ze1HiQS8 8LhUi4oW/Wf9nn5U+0/us31FqbyTvplWlSJkN6FLJrk8g2BQkusq5aZ94YOZ8dTHM3Vt 7iAw==; 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=cDeT3Qj3; 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-146212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146212-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 z14-20020a170902d54e00b001e3e1e8470esi8871611plf.269.2024.04.15.21.14.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 21:14:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146212-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=cDeT3Qj3; 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-146212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146212-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 CCE6928324B for ; Tue, 16 Apr 2024 04:14:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B9D713A87E; Tue, 16 Apr 2024 04:12:22 +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="cDeT3Qj3" 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 5891D5EE67 for ; Tue, 16 Apr 2024 04:12:18 +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=1713240741; cv=none; b=aT/dxmp+wU5BpfQ9khG3vVFg6+FefKPZor6wN+ROyaOBpuowdMSgEFPRvrL9wDlehxpc1GpyBApidqsPzSGMMUaCMhQqPAwpsEVariMsgNzE8sPHYdOiVBJ2djmhA+M9jjecimI/1aaRAc1MfiE4rX3YX97mQOYed+W/P0SApik= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713240741; c=relaxed/simple; bh=wcB/ebDhkfkPBVDQxoUt3AjUlhzpSXzz59SF5DkeLyE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=J9dw04504NOxHUniZZD5Tjhlp5q2CnZs90MFidj174WqRGzzxo1uhV+1HVugD7Rqj0c6c5jRtdNJzEBtvTDV3RaXVUEz/V9GvyG9xfw13LkcWlJsZekpjX/KV987ozfaepX787ZRbcafUX7YF+vnMr18Abdk/CuN9z6nhwc4hII= 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=cDeT3Qj3; 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 Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-22ed72b0082so2642439fac.3 for ; Mon, 15 Apr 2024 21:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713240737; x=1713845537; 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=cDeT3Qj3bLx4GNuLOw0ISv28Gn/Fwp611oxVPxfXbuzKX85sYeKKPy+UV2YZN1aORO vLbASYQTnJ2o7RvAYZbBTRSLiQjN8N6TFgxRihZtK0w8hg5BthG8d4eBSxPcST9iQGUY U2o6JbIqKX836rV1WKRO3H8XPzZTE3fVQpLLSnfT0RC2QgtYxHFiA8e1M0mmxkuZ55pL g3XZAZbDpYcx2m8Ert82AvpPVnzp43eDporioWQIYTObP0Jw2nPQK3VRImCVWHFGONpS BtPTlKz60PWIvg0mimj3eE1VgAKI/prV99ZsOkKOC9iIjqghxwzLs+AT98OrUddBqRjb tbpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713240737; x=1713845537; 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=xFxzWsAQl1tOdV99oHziu6mrERxdgkhgJN6F/tZR7YMS0PxJOaEVeSmrmYk6OsKGCs cVwv9QFKqEGhUnm4TvuLUdjfcGBPZYIRZgaO/nrcuLRFt39Yjj9b+EHAUVe/1TmpcIRA V0ImGumVVmxDTQindEDMWamZqfQnAnSgXU6qeK54asahSDajBtUpjHdC692CJ4RwiKKx Pzdp0yULTo6IYw5WibHP3LHJz0AjJQGGqlHe2R50XpF8kiakE2MwN9G8T/sla3ehrTTt 5T3sAWL0K+8iMKhCyN255HkH/jHJsfXoTldWLAWVPw7ROdA5DM1MB6NoM36ICJ246N2m 7OwQ== X-Forwarded-Encrypted: i=1; AJvYcCVTJUl4NGV511b798oxpktVd+NjEp/7KxrAV1SCGDr3xaM1ZZBFMKwSEJO75SR7h5eczsu0V7BGx+lmRWnJz8oOkFmpPl4WD3ad5dVz X-Gm-Message-State: AOJu0YziNlrXdf7PrOlspsC5coVY4bwkeSoIDUh1cxNAWRhc1kPHja8f xXc41Fdw76qUwzkrYqrxD672VnP3iVq2N8QWdvWz3n10w524U5rrfzcZHezvd4A= X-Received: by 2002:a05:6870:b293:b0:22d:f859:2225 with SMTP id c19-20020a056870b29300b0022df8592225mr15026805oao.6.1713240737601; Mon, 15 Apr 2024 21:12:17 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id z184-20020a6265c1000000b006ed4c430acesm8383149pfb.40.2024.04.15.21.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 21:12:16 -0700 (PDT) From: Charlie Jenkins Date: Mon, 15 Apr 2024 21:12:07 -0700 Subject: [PATCH v2 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: <20240415-dev-charlie-support_thead_vector_6_9-v2-10-c7d68c603268@rivosinc.com> References: <20240415-dev-charlie-support_thead_vector_6_9-v2-0-c7d68c603268@rivosinc.com> In-Reply-To: <20240415-dev-charlie-support_thead_vector_6_9-v2-0-c7d68c603268@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=1713240719; l=954; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=C7F1c584ODJM4qF9TPT5kMoM8fDlOPYyEMw6010Mea8=; b=gL5a3gZt7YmAzdC8JCIo8MXcZ7fbdc6iO361KpgkRlf5taEU4xnmrghYwi1t5py6BJP8PyQO9 P2I8p9MxL5KDfEXe96mXU4uz3Aeg9WWgIVAt+oJLRgmHkwkJ4xayrK0 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