Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp144396lqp; Sun, 9 Jun 2024 21:47:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVeD79zaula1i5WdUJFANqsNxL90AsNP7lJyWjwHDfkuvc6MUuQ70NQ4+8RFcVywp2801e4Y3taJjFNv/F8453/5F3f4bFvySYDXjG0pw== X-Google-Smtp-Source: AGHT+IFg30OG//b9UvYUlldleWrkBzByNiIupPBSm+kgngz3Ve69JFRSp/ba76lzT2XznI4b4xRX X-Received: by 2002:a05:620a:2708:b0:795:a5d3:70f3 with SMTP id af79cd13be357-795a5d37341mr257288485a.22.1717994837152; Sun, 09 Jun 2024 21:47:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717994837; cv=pass; d=google.com; s=arc-20160816; b=cwLAfNiklTB8vpnydqW4Cene8u/235lrAVjo7N3LEzW0FGxkMLtSwt5gsY7L9aaaXP 27GU8LbGutvWeKchlzMOrPezmwj1ZOHmaD4yH0PiDZfQpMVNGOgLpXB8b9Y/mEu+SYd7 /+KaO4u3R7SVhTrLsmYSK+SnUmnKmtL5GpBKQDxEq3LVek7VnaI8oKpJ1adwjk+EbC3Y XKa2kCIpzi/8HWUQLyfZI/1C5SiAbjQ5NbOyGFcm4TI2ztJ6DxALDJg3mbLMEPRi6BFN F6BQBWyy449AnvjJ3G6EfWi9jESw9eRTNNCrTHOs3MNUSi5GDGWh21lGpSkBtD7ZgKh5 +LQg== 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=wzgie6BC9pcvihRjv/qWBqw3yah5ta+RQMMS5Awf1zM=; b=WTZFHmawUJLkg4v+/qGMmxTefjvW9uP3EDe3yiN8XQb7YXgYdfmsTyBEwe+9aDZcKq fOu2+b2p/FBu+2pVhJmFN2FTICuw8iA1y/qG/UeqW+wKTcW0IHhFbtaEozJrV9/k5S7q l7Ti0T3w36SJj4VYrdH1AL2mRwFl+5O9drMYKyZaWTVmALKghz2RyWqMKylUUV+/N5wj QY/PceEjeLInhEMYunOkPaSrFzMiOmFlUzll5sPYeOCFJypIfZLi+4cLN9+pEb5fjypq L2WXaLrWMG6WZtdKxaXbi9uELyFrOYK+PXm0XY41P3TaKyNSWzjqxCX+6JhC6kvYCbjG UxrA==; 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=CwyKWGpa; 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-207632-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207632-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-79554d86ba5si465376285a.69.2024.06.09.21.47.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 21:47:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207632-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=CwyKWGpa; 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-207632-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207632-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 8F9291C20CE9 for ; Mon, 10 Jun 2024 04:47:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C9093CF51; Mon, 10 Jun 2024 04:45:52 +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="CwyKWGpa" Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 89826101CA for ; Mon, 10 Jun 2024 04:45:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717994751; cv=none; b=lqoCUDUC60aEJ5Wg41a49u5+Kze+uVUJwd2AgxKevZNnZPSDc8ffx1i5hMLeAdCX122USNwF4fecS0r6R3Rp6VZuu+amYDb+YWyt1hzVxkC1iPWQ8ED1LFojTIA9qzwvsqbCv45UAdaq5g5by6ymYtqF0mGWnYzrSHx/lwOqdOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717994751; c=relaxed/simple; bh=YRbwjAEMooOC1Wqfne0YGBAOlvdWm2exzND7IqGSDDM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=U4RYYaSPYMNnj5Clj8KPMXiKplauXHQChktrXLKrdo+toTy/VBdc99pGVVJu/f4p9YG06PNwRCA+ZPsHRXauY9x9OInYdoImGdzOE8/VvnTuttRNCKnvrO7VfOcZYNT1bU3hyMwoUjx8qz981Kln1PgvRZ7vvc8BrI8S9hVKB50= 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=CwyKWGpa; arc=none smtp.client-ip=209.85.214.178 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-f178.google.com with SMTP id d9443c01a7336-1f7028196f2so6326735ad.2 for ; Sun, 09 Jun 2024 21:45:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1717994750; x=1718599550; 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=CwyKWGpaCevBq3LY6tPDvBUN6kbs1o2VRTRwceAAm9mvNClJqwMtBmtWZz0txBVJUd qLtmK5PTEDH21Wvapy8rZY+drGlU55GApyVOaik+F6FNoLdEGzEGsEEEQ2i01WOxxjaf h11qh1D+q5BzAKeHpuVi+3aJqgIXxKXv4F5INwKUP1bOr04PdG1n9ivVXn54Le0SfyHI Mrm9V4JnivwIo7+wjobPSRa/V9RaPi3w2UM1Bj89P1+8mu6TdvglKYTifomalRIcexIv ASAIg8QZdXIhqFngYcBo9uEXWs4uRz9jL3iG5h5Fm4yLU65sZhFYdClhOyGzHNXAnazV s5kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717994750; x=1718599550; 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=XmWOgxHXkdpiby1q5VBUy7ASAaQWBo51LH5rAmUD0SoRzSCycBPurLVPw02S0xvrYN U9haDYG3sb7Og3WRQFsUvIj5CH5Z8hHCWD92GxP9jprrvt9z+2USpLXB8wh34cPqH6CU nUpIoYdZ0lpAVBHLBkomWUGqsGW4OSxse+HCGYklc7g6K+guB1/qKYbkX0bkJh3MuATw P3/KjIG1z8ht3vEToW5XHAF+hHCqKfahk5NGNSC/pWvfwsTykcH0EtanWCatvOTw0bLX O9M6m7WfK32TcVxvj1K3yBYy9NRXZKHlVGA1IAc6+UZU0GlFaZvHo2fizdAmfH9zd431 /D0w== X-Forwarded-Encrypted: i=1; AJvYcCVfjNcDQHNc1OzXiyoImtp9YPdYZNkWh3cPQFKZ4tTSjxDw4+u6l1lX7hFfxtnQJFhUsO/ROiqWsR7QAMLm/x+L+QXeDgPVc4Y2yDen X-Gm-Message-State: AOJu0Yz3VQsWrXXhq1RfL57oudroKc0oJwNKsz3GrtokgTBNjtXMft1b 5Erp55IccbtkvYMaO7CaMziiC4G9+PFs3sN3ya+XhwDoliCTMETPlWd82RTrcVU= X-Received: by 2002:a17:902:d4c3:b0:1f6:326b:cde0 with SMTP id d9443c01a7336-1f6d02f98ebmr107670705ad.31.1717994749999; Sun, 09 Jun 2024 21:45:49 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6bd76ce8asm73124095ad.77.2024.06.09.21.45.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 21:45:49 -0700 (PDT) From: Charlie Jenkins Date: Sun, 09 Jun 2024 21:45:12 -0700 Subject: [PATCH 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: <20240609-xtheadvector-v1-7-3fe591d7f109@rivosinc.com> References: <20240609-xtheadvector-v1-0-3fe591d7f109@rivosinc.com> In-Reply-To: <20240609-xtheadvector-v1-0-3fe591d7f109@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 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=1717994732; l=706; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=YRbwjAEMooOC1Wqfne0YGBAOlvdWm2exzND7IqGSDDM=; b=99wn/niA0cQScW2RZHdAYs/G3d+6fucqbAlEziDCOsNFlslIJ1kTJdSJRonbVlLwckEyjZYSv oLpqsYahmVoCslt9Y6Si3QOPyFQR5kdwcQuHfdy3fJPz51XrWIzyAzd 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