Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1564987lqm; Thu, 2 May 2024 21:49:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVc0uyEW9ZIau8wRZetsUBZfuQJyw6Mf7P3uBiEtWH8MFK4Cx7UZijnWaTOPUJ8vNPbFuxycVy/hTImMySdNiRS9G80lnCfI1J1yGzLNw== X-Google-Smtp-Source: AGHT+IG6DBV/Wuf0Ugd1oCMsdoCIh1KEiGu+dqufqkWmHU1PDgp9mRAbPvvgDWGNZjhP4d/1HMbC X-Received: by 2002:a17:906:3748:b0:a58:d7d8:2f48 with SMTP id e8-20020a170906374800b00a58d7d82f48mr1159727ejc.72.1714711793870; Thu, 02 May 2024 21:49:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714711793; cv=pass; d=google.com; s=arc-20160816; b=RhWfwKvgBjW/YIpKS2AScMrbyBmFT0Zauj6pNue2u4GR3nO5rvfui3YDjWpsgmbS+R fz1ejjgoKQ0VWFqwMjE1TG02czZNEWMcwV4sxkPKS7LGghZtUFTT0Qm6Nb4ukbI1cEnQ DR3UjiBN+qofdNRdKBEzUZheFtl9nbJY5Lh8XDYpuHqzlZDss458/K7c5mcPVK4jYMiR EBD909gKyYlhS7yhbORioZbtYi4OCiZUYzH64a2sqjOU1cbrfS7kWHBT0pAhpH2/pRaB xeCyktvSHhYuw1WGhRwF4kel9FVYfKmBFDEL7r8ZmnQ1bSUS2wPa++SWsRapuTKYfEqF 1vSw== 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=owJj5fDF9dy1XUQF4iuzoJzvoEiBi0S0RnbqTwu9Xew=; b=JTOKfVV9Qe6+ao4xWd/RlMWUIT8I0Jsz3fV0wVaXAECM145eKg907gVcL9+BDdZtJ8 z6Pw5P0PevM3I90zw8Nh29R4ST3l+V8WRiWDpIEiGYZwiG3xyRKWQ5htwswPup8Z4hAb KqHyimcpYCjjKdRM6QAL/pwH0sAzdGMxVLNG06CnEl+fl2JyoSeULWDr2wZh3SCATHLm mqExkK9Q9SotNpihjJ3xHdjUaZabIW7VDOd7fAO9X2/yFeD7362lpQmaH+Jsnq7WaF+7 DG3vYHUSoZ0KFGs7qWcnbY01bO3HAGua96Q5xvnrR0JwLZOnWfBNwYk8Dmg0ZLhoCqZ+ Nb5Q==; 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=UJjAaBs4; 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-167241-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167241-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bk4-20020a170906b0c400b00a520e463226si1186785ejb.516.2024.05.02.21.49.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 21:49:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167241-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=UJjAaBs4; 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-167241-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167241-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8BE241F20F52 for ; Fri, 3 May 2024 04:49:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4BA37139CE2; Fri, 3 May 2024 04:47:08 +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="UJjAaBs4" Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 A2C6413BAE9 for ; Fri, 3 May 2024 04:47:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714711627; cv=none; b=IDIhvcyfORp2uHR+VS6oKToGVbOiXCyjiJEtKkITzS/WtMBjw46a9nxhl8zpA2R4DF+QaEkSAIQ2R+RD6RCfvGcxhmG+JoA7CepSKYFZI9J7rtT0D2dEQ3wB2RGXlHinczlilC0jHgsY/eW19akZ8pvL2aiWpNjuBDENJVXf1QM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714711627; c=relaxed/simple; bh=wcB/ebDhkfkPBVDQxoUt3AjUlhzpSXzz59SF5DkeLyE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=juzPVp4bSRZVptvW8+TeiSP7oz6uGgO00gBlJgcnb0TFdn4xqWvzJ1wKQDOYcTvuWGWcyUkWM+C/e/KmYgkzW+2+4hiscbtlL6GL26oKqmWAzfxH6n4OggV+5wPq+sTHjU3cjjksbWzmEFiMcztTpf9D4KvQ9Hpt0V5SRZ4yaTg= 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=UJjAaBs4; arc=none smtp.client-ip=209.85.214.180 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-pl1-f180.google.com with SMTP id d9443c01a7336-1ecc23e6c9dso15583455ad.2 for ; Thu, 02 May 2024 21:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714711625; x=1715316425; 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=UJjAaBs4bAxzMvwKs17x0flRlci48xOa1OgdGWZZBXeVCJ5CBr54wueaXl/kCg5jsv s1hklwRzBWcK4Nia0B2295bVrHt4SGILxAGFw8+1uNa3mhxIjPgzTsXQ9IkK7coDy3Ft dfXlOS6vx0ugG1tFuVtJmYlm+iz3Er4YXw9JTljhwolHBjJMml/NWeYtiWGUSiP3nnqR 59RNw0wk4CpjWPHHflkyEN7qMr2ES+Zy/OGxTelff0bZBM1YVV0tCz2ZrmMxv4qb2Izt oXwuN1iSqdZVI7NaqqFwTiYjKHOIP+vr6FEn73/rLRrp9XTFmCQcRFNygtU4eIBetLz+ 55/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714711625; x=1715316425; 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=EElLGSlrFxgM0UGkwZqtUSphbOlqHbnnHDGSe4RvmdAfayHXdzjCs09ZgrKNh57+HY iskhCEwckRbU3VkBXy+HETsEGmm76leS2yt0B+RwBHsH73u7EeroSFM9fW9IpRT3DqZm qYFPs5Z6a/m0wkEaQbG44RDmfn4LQGtQozZ6dXMRRq1I+yTsNez7OI8dTyE9HkjgIzDw cFbCXGKQb4sNVbPBd/yRwZsizFV6QfII0+2twROKk3IOXZCaXIbsE3dYFalp4WvN6KYL /1qog/Hlsvmh47eHu99uLhcON8vIlXxA9zpXh7I7dk5X5ZKOAgKxPl6NHpIaxfo3Dcw9 b/eQ== X-Forwarded-Encrypted: i=1; AJvYcCXFsHPpdlWfvOQrcSY6EG6hu4+bU1UQMQrRmOnwasruOpxK2Dao8ZpVWG/VvqJsUZoOMRSfOhRPhB2sdysW4nJFRy6noQYLxdZSGZEp X-Gm-Message-State: AOJu0Yx3pWPtAAHgy2W1jK3zpaNPUVE2thFTLMJtc7iKSaLTIPEcRDTm SLCdEeHrpu8IbyJyICuSnrmC7StmnfWKuhrhzMc/HUqBozo7R762udK7N31kQLI= X-Received: by 2002:a17:902:6bc1:b0:1e3:e242:4dc9 with SMTP id m1-20020a1709026bc100b001e3e2424dc9mr1627010plt.33.1714711625059; Thu, 02 May 2024 21:47:05 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id e8-20020a17090301c800b001e2bb03893dsm2240411plh.198.2024.05.02.21.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 21:47:04 -0700 (PDT) From: Charlie Jenkins Date: Thu, 02 May 2024 21:46:45 -0700 Subject: [PATCH v5 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: <20240502-dev-charlie-support_thead_vector_6_9-v5-10-d1b5c013a966@rivosinc.com> References: <20240502-dev-charlie-support_thead_vector_6_9-v5-0-d1b5c013a966@rivosinc.com> In-Reply-To: <20240502-dev-charlie-support_thead_vector_6_9-v5-0-d1b5c013a966@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=1714711602; l=954; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=C7F1c584ODJM4qF9TPT5kMoM8fDlOPYyEMw6010Mea8=; b=hL7t9YD70TVJ9RCYIa7iCFmk1VSkj7KUU8JdWDeJG/jxY1JZSDl/mWwHtuMDQBiOJ0PIZdgaR iKOSKxqaBWZA1yRAFkHEI4kLmPLYbdTrOUVL8YrpVvOwp9MjfHRvnF6 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