Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp213182lqn; Thu, 11 Apr 2024 21:14:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKAF7vQGf7K2QII3kLfzxEaF4VbJ2EjSej6QN9a3iM8yikJ1k0GLy4KU8VkdFZ83Wuzqa+cKM9WxjeGyZvIOvoEv729I0hsvsKJSv6+w== X-Google-Smtp-Source: AGHT+IGNMr1JX/2SVZ47AtiH9/SKoU4upzhlhufiApliGMrslOMncYEDb63dvtnEKtUm0LMSU+na X-Received: by 2002:a05:6a00:23c9:b0:6ee:1508:edd4 with SMTP id g9-20020a056a0023c900b006ee1508edd4mr1805435pfc.7.1712895256520; Thu, 11 Apr 2024 21:14:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712895256; cv=pass; d=google.com; s=arc-20160816; b=BbmJDgt5i7PE7MUtCF8RVrlXMci3iC1SJkpzhyncmqt6tP7jc0s26QIj+z9g2QKRjy z2BcoEk90iL+zqalZmDOBRFhCASKZ0jmM3ATtES+q8R7UkgAC6VrpbQHHuPgyC2Ifav0 FpKYMO2olWXpQWL2EZ3aB6eUTZ2UuAmGHz9LaSbSRj/+9VNrXEkmdTzPdZo0A2yVbiMp m8pPtEcGl50aUfidKLUbcDFlgiZMYCnq4zCqasdZls5md4cmPOHlUk3Uw8iS26OIW7Of /DTRwL7de4KlyXSFZLkS7lxaQIZ81C3IilwmnLzPxDAX8ztud0MP4GCK5B4GxNxQ9tjj 1d8g== 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=H/cX7KqBpjbvwnfweF/+d0sA0CANzzmggwTxwJIRs2g=; fh=LwSorbcf9naco1HcnxYlKPmA7XyYEXEW4xlFLHcshXo=; b=XMA3SM/SHLQSc57g/44Cwef5xcO6G//It8R5tNmvkOYnOrTF0Difttx58Zdt7vwZhV 4MCiM5iG9ulbZ+g0um4/PvucVyTm+OxKRwNhPG2ORcXsTfYptrCYMBQG6YGSDnARdbhe WqRtZT+j28GWo+cE76+LdGzvZnW6So+uMUSOTI5Qa6IOs2fFs9rZY3LQvFzDOsILicKx NOBSUn7V7uk3yxdurXBA9a1prFeLGvwYK2TCubyILOl9jAQTtEHjSN8a3S9H3oINkCjt vR90mowpSRe0+VHbp8eClhM6AY7Kt8kpZYwZ8M3ZGf9RxXPDwQJYqJKvH20HAj/0OEoI QDgw==; 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=NSzTDDZN; 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-141900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141900-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 y2-20020a056a00190200b006e73e276e3asi2634037pfi.52.2024.04.11.21.14.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 21:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141900-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=NSzTDDZN; 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-141900-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141900-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 32394283C63 for ; Fri, 12 Apr 2024 04:14:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ABFDD4D11B; Fri, 12 Apr 2024 04:11:55 +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="NSzTDDZN" Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (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 32AE047F7A for ; Fri, 12 Apr 2024 04:11:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712895114; cv=none; b=GORcNwRCsEpzFRiP8X47YYJEo70edWcoEJ0sbWnFyJRbPXdXEpP2fr9PKfcqCCeyN5w5lVv9ee1R2hqP+0Fb2Zwmi1uxW0zGmff+dK7I/oYqGFYMjX0H6Hjovq4WgeW4US4GxD7rsYQj7aJmZdrKy6HEz4Xg9wQPTuBCMa8yRNY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712895114; c=relaxed/simple; bh=Za48erR/9zmvplWXXS8ODcV1Z9QaGewR60ryl+Ilosg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MlgvANNC8lI1nUoPE11eOSnZciWn/P73sKknzNiRsTXs2IZ9L79JZWJBmaMCqEiYZ23O2prqAHqQy7bjjBI4H1OV7RhxroO96vEi6Vw8gSy5EfiVZ4iTUsLiCZ9NikY6id5C5P+CltFHxm4/jhXMdnKUhzvSSYypvc+SUlSqvHo= 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=NSzTDDZN; arc=none smtp.client-ip=209.85.210.44 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-ot1-f44.google.com with SMTP id 46e09a7af769-6ea128e4079so354472a34.3 for ; Thu, 11 Apr 2024 21:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1712895111; x=1713499911; 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=H/cX7KqBpjbvwnfweF/+d0sA0CANzzmggwTxwJIRs2g=; b=NSzTDDZNYgvWB0oKg2RM5n3bdam1IrZhwB7KMX1YWjJZM5lFAaAmH1ExQMxr1fUI8t gU+X/jGwI0mUBE5VzXbWTtXD0bw0+VVlszvQ3jDmAnhlxUNQGj3gkHojKY4BiJpatdAR /O0X8fr86eaYpASSmg5QzTsXFvBvyUYe4VBk65SCV+6Ad35WK1eA3gyMJsP1iRvnGa0g snNh2SbCezmZLi/mrrweMPE9agH6pIVKHnMXkxW2YIZUIk/tNZ0KM53opWqf4W5LhtV/ abKvW5/nSS2K8yhKRbI/6aD1QTIxWk1dJQOT/eXUYdhkLpXY8zgFBgQ0BhH9gpoF3KAq 96QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712895111; x=1713499911; 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=H/cX7KqBpjbvwnfweF/+d0sA0CANzzmggwTxwJIRs2g=; b=ga6751MGpWDghe2i4ypYJaUmkFZRHJJyDxJCb1QslDyVOZKENjoZgD+06h1JHsfJWg 2MD2HxxItr03CagxF518ITj7JUofI3cM8/V+5LnydcizyGoIalXQQuT3KRGDsZXKhP7p CK++1imD5VhvKhfMm3naiZ7i8uAWw5lvkBfs4yCKQvOT/YvasZgYU4WIOl7yrurqi61i t6wDf7JurRPZPsmxOBvgoOYehyZglBfvhS67UAHC3rlNAtga9Gmmf6oKdgxW+0l8eJaJ NqMQiJKZq0SbxMAmworfrWoJ09ifp+Hu3SHXGZjG/RppFbIWgECg5FpMVsHDekI7qz1S tvMg== X-Forwarded-Encrypted: i=1; AJvYcCUreOBHOI5apazo/Oj7TVaM6yqw8BExl7mExhIUysJIC6n0h9aZnrp8nxCM1cwEn/g9fUTmMtaqhUR6x5mS2vstpcqQPZ40MDtioWPx X-Gm-Message-State: AOJu0Yz30e7ckABXzc0P5uH/z4Uk5BiAEjvRJoiNejR5+UIV3t/hPJxg V4kT0HV2t18Nav1zqp60KwrYiG+FqLW0aJmyIlMIJqeC0BysDoeI3/RCDcwGodk= X-Received: by 2002:a54:4781:0:b0:3c4:e208:b784 with SMTP id o1-20020a544781000000b003c4e208b784mr1726036oic.27.1712895111330; Thu, 11 Apr 2024 21:11:51 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id ka13-20020a056a00938d00b006e57247f4e5sm1949712pfb.8.2024.04.11.21.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 21:11:50 -0700 (PDT) From: Charlie Jenkins Date: Thu, 11 Apr 2024 21:11:16 -0700 Subject: [PATCH 10/19] 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: <20240411-dev-charlie-support_thead_vector_6_9-v1-10-4af9815ec746@rivosinc.com> References: <20240411-dev-charlie-support_thead_vector_6_9-v1-0-4af9815ec746@rivosinc.com> In-Reply-To: <20240411-dev-charlie-support_thead_vector_6_9-v1-0-4af9815ec746@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=1712895091; l=899; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=TuSThplyvDtTVWqwUFhV/gX6CqguLjbnzElxxGAX5lI=; b=IoxQnX7xJtd3/O6TEZTN81ZKioZw5d0r4tz8jwxoksLzmt6rX3y60kHb1haJbdArKfd+lqIbO ic08kmN1+92DSy5wQJq3UBtk09zK5SOAjN41rNduYXhvK29guCQEHVa 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 --- 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