Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp6064lqp; Mon, 10 Jun 2024 15:59:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWe8zxL5fiKvmuvTIiEpFdTaJAkPQ1rif270Z7VdLheu+RwrbpKH0IvU0ioJc0BgboyPRI+9HrraWFElZrfZiRVACGggLhimgH7OCjHKg== X-Google-Smtp-Source: AGHT+IGTv0ZoVg6ZFuBbr0MotlksVOO/KAu5gMKaI77fKUbAIGjOyhQgolFa5sa/i/VD7za6EEZz X-Received: by 2002:a05:620a:4412:b0:795:49fd:3182 with SMTP id af79cd13be357-79549fd3d5amr1064315285a.54.1718060353986; Mon, 10 Jun 2024 15:59:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718060353; cv=pass; d=google.com; s=arc-20160816; b=YtdG9Bm1JSaN3uiSRrHIWS6eRWwiYGxe7LoXMlkcJ3Jv9d5pA6ZH4IrObkhJvIOg7j 2/9ceWzQZQn5KgzsNM+AJ5XZS+PT8XvFw1jF5CzVDk7qRWzp5MGiGrkOEKIsUYYvKwSR HGQNiJi0vcYCY63k7SETge9g98pzlhbgyv3DPZdrWvaWweb/W5fYkv/UA94ujy6f4aHj yb9Wkawk2m5EJD5JQJy5qkejOg58N1VMBO5phj9Sermb4JtPAAFOpZMQO8GRW3nyqm64 DLFkUnj7f3o8eoH6QM5mLXo6ZF/Re0gFzDjSVKppJU8kmU/HuhvEm9jxjLMnZp68hz3E qpQw== 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=7HBSOfNpcERRo+IfFfSUzbZmQ8OANKCSab29OA8NgQg=; fh=47sunZsaN8MrFtIrm7HuIa/ekG9mnRxelwfNimchkXg=; b=xHjg5XmS5b/HkrntQRrcO1kvmbinCuvhK6t8JsoKZe2XejOeE21WAXJHDD1DXaljLG 5ihn3i7HSH0uCWzSbfuuAOfwmP16axCPvrCQvtVx2AI9KCz/sSXfRKoB65lzKz93mqFl I2s4cMlXXPZMDUBuKnCAu+DdhO9gPmHGIzpvw+d6d+GeRrfB7F4jmUAoCF9cqERdl61o 6GgVPukaAJtLWdWd4Qc8tlR9z772Od8IxVsBOgV9Uvawu6ofYdA37ZP0PCj1azk1yNcj I27pp9W4M7YbaDKnzR0ESRauJDjz3J2hXgqv2jsdZmSOTClwQ0L7xQsR0s5lfPccXdoV BPsA==; 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=QLbzE9IJ; 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-209028-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209028-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 af79cd13be357-79558cb56ebsi598789685a.3.2024.06.10.15.59.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 15:59:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209028-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=QLbzE9IJ; 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-209028-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209028-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 649A51C23722 for ; Mon, 10 Jun 2024 22:58:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F2D015217D; Mon, 10 Jun 2024 22:57:04 +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="QLbzE9IJ" 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 092B515533C for ; Mon, 10 Jun 2024 22:57:01 +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=1718060223; cv=none; b=exu8YASvYydikOrGnpGna+6UW9NR2lh41t0DNIJwd70IkBsryvedZ84b1kusTkaz7dUyGJS531z6gDqrbdmKtm0wF7aQYQnXnrCub+pm5MBhhoazuuiLEyUZ2I33LYPXSHTG4kXz+31obENGqB42YXrIWm+a9ToXmpzMZgGM9GY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718060223; c=relaxed/simple; bh=YRbwjAEMooOC1Wqfne0YGBAOlvdWm2exzND7IqGSDDM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FLnHeJGlX3B3RVF4jguFIa/KVwYROdYawSfKzJw9jPfji7n2FwZEz2wshaboEEZqnPwxhshdtAaHG0Q/2VwD+wKn8MtyINNebwaMYBAQJvUK0G5WuIFA6OFce83HAO81tw35n4u8loeLeFDk8I1Y2GyWlj4r6vgd0kOhU76ElMA= 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=QLbzE9IJ; 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-704189f1225so2706710b3a.0 for ; Mon, 10 Jun 2024 15:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718060221; x=1718665021; 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=7HBSOfNpcERRo+IfFfSUzbZmQ8OANKCSab29OA8NgQg=; b=QLbzE9IJ7OiNESxkyeN1jywesSy/24mBAcn/dMJm5hjMlCQrj2whZAXQMAJPXcgVsa /SQiPwbNkE8nrGXKwph/gRfUAnZ/GaHCasjqZqBXald9FcFRYWT2375bMbI04oe9Vw83 pw9gFjxyMjyqdbPPxYK77e1j0hQderLwYXUNaTqY1ySapba15lnjwomBh/etwMcfUnQy FBuFzNC8G5sekaAl4tw+v8DRK/DC7DFLtmscMwP8wMEjNn4dHxqjh7zBoczo+rjuh7/T 0Zr4zsbTxDJTJOaCECWEw2oiqxSh+uYNDsjYT2FtMkqagohWhmbqlpVUZMr8anM46DJ3 Znfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718060221; x=1718665021; 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=7HBSOfNpcERRo+IfFfSUzbZmQ8OANKCSab29OA8NgQg=; b=mvaYCpAtZ0RWGM33PH5aiIe6pPmp0E9IBhCR5ywhCFQAwhu2gGfWSbAWImk4kdTUCy x6yo9oH1X0p+DJ0pERBoVVtbjuWJzqR5OYOv3joY2mx8BTT+Ftp21Z/nBBSupUIKPGcZ V8UkZ2BxTq6jpUaKC0w0PqCuOY7AukOECctFLxLlLa8lbkw1ZwM6hB5XUsF6PaJ0isW7 AnkXymmT6ez93Lax49fVM3eSOLdOoedK0v8ljuyI3WFh0FZkWeKxgkviNPiGHV7B4jGR j2RI7xxgzRZahUhq0C/waNhe2/YOBzA9XdFbxJpLHv32VVmIDs99kIqKJ7naS74Jfvxc 3Nog== X-Forwarded-Encrypted: i=1; AJvYcCVyGzrQjzguu9cxSUifqygQrkAIdvQoGh5M7fq/U4ySsx9XPQEcgnDjJrh7ms+sVA/B4HbvLk7awBzcnvb78WJVDw2rwtTqMevq93yA X-Gm-Message-State: AOJu0YxIFeBLGiQtv3Iz5oiuOLD7iWkrbK0Ok5edVXpk3xzDiEAXXwu/ p4XjHAUkfqQzqEHFRidNiPHANyWct9kpDJtOyhJEhFhg4CkGpMGqZKkKWBLE83k= X-Received: by 2002:a05:6a21:9991:b0:1b4:772d:2885 with SMTP id adf61e73a8af0-1b4772d29d3mr9114268637.3.1718060221031; Mon, 10 Jun 2024 15:57:01 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f71b597072sm18355865ad.99.2024.06.10.15.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 15:56:59 -0700 (PDT) From: Charlie Jenkins Date: Mon, 10 Jun 2024 15:56:44 -0700 Subject: [PATCH v2 07/13] riscv: csr: Add CSR encodings for VCSR_VXRM/VCSR_VXSAT 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: <20240610-xtheadvector-v2-7-97a48613ad64@rivosinc.com> References: <20240610-xtheadvector-v2-0-97a48613ad64@rivosinc.com> In-Reply-To: <20240610-xtheadvector-v2-0-97a48613ad64@rivosinc.com> To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Jonathan Corbet , Shuah Khan , Guo Ren , Evan Green , Andy Chiu , Jessica Clarke Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Charlie Jenkins , Heiko Stuebner X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1718060203; l=706; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=YRbwjAEMooOC1Wqfne0YGBAOlvdWm2exzND7IqGSDDM=; b=BM5m5V/nQRNhZjvOPuMabe0KTvggdAN05fZDbXe+2vVdatDi9tChErTOUmlzrP1AEH9N7fbby PcLGUrn7jT5APulSOlHctEyjRk1D0HhX5Gm8tzJtZGG2+4QDc9oh7fv X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= The VXRM vector csr for xtheadvector has an encoding of 0xa and VXSAT has an encoding of 0x9. Co-developed-by: Heiko Stuebner Signed-off-by: Charlie Jenkins --- arch/riscv/include/asm/csr.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h index 18e178d83401..9086639a3dde 100644 --- a/arch/riscv/include/asm/csr.h +++ b/arch/riscv/include/asm/csr.h @@ -220,6 +220,8 @@ #define VCSR_VXRM_MASK 3 #define VCSR_VXRM_SHIFT 1 #define VCSR_VXSAT_MASK 1 +#define VCSR_VXSAT 0x9 +#define VCSR_VXRM 0xa /* symbolic CSR names: */ #define CSR_CYCLE 0xc00 -- 2.44.0