Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1476947lqt; Sat, 20 Apr 2024 18:07:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV8MGiqYR/8cAg9ZhNjZtBzg+UDI03mTw1dFpYyWj23LQMuwoJOBoGwBd5CsQC/96JfhoiNjJbDfIpUthEKw4+D7E1XKSuK0vqrFltp4g== X-Google-Smtp-Source: AGHT+IGINLfVPV/XtU2siLP4s7gacCIOubR+90IguNu0mmCHRCJkKj8HP5has2T0vpmX0g2UOnaV X-Received: by 2002:a05:622a:13c8:b0:434:622b:d054 with SMTP id p8-20020a05622a13c800b00434622bd054mr7685000qtk.66.1713661639869; Sat, 20 Apr 2024 18:07:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713661639; cv=pass; d=google.com; s=arc-20160816; b=iHmKl9nGZmtmXmu9yqGjiVmWC0WlkxMj/17+/KdNa591RpH5O0ub5jpUltH8CpPtsb QUAYrEPkSGEeJ1aKey5KWDXXbSPwQF6GhQOQuauttdWw2Eg+ATHNO68pPQzDpMsEP+vh jvFL/pZoJzYSyg+eCTiVqv+7o+rU/A6zsXVWNURXfE4Rm2EplOTdwvzPxpU+H6wFeTLV qikHkDAgrmmE/I1cu6HSGEl6oCBmSU8JfkOijdVGnDpA2heQeHA48g36umMKBFwSMZp+ G2ZiigI7CyBaXNKFXRK0zYM3Fvm6p1ww7dagALKSh1iOhLfih6eQW/+BjC+qE2YT8vo2 Ak1Q== 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=TtuB8Pwjqc6iySuZXO7ggO/lk2YQxjFbWAen0C5cxhg=; b=pO9RXZhg+oHz4RU0hEkHfVU698Hmim1EbC7lQfJWw8DUyjGvSybzxDo3bFCB5IqZzo /vv2K8tliGeEto8sjHNpqZnO493EfHaoX+uuuroVv+rsmdeChYPU+o9U6U+9V5Wmqe61 E1bPEVujEUAu8eE3TPYrKBLCNw4aKQugdQWlQS59lQM7RZs/mhzxTf9VJMu7V9jwpHVT udaZ9qfeFE3XQtnMlj98dWyvKMHyRj5JpWEJj4OyY6pXYTA7IKTsHbz8GWviFMVS09yr +IHxTUZl0qAFkQqcj9izUZyE8HiToGXXY8b44+NUavjbHDVJ3qdPcIHz7bhCZvitKqb6 ZRCQ==; 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=x3W1c7Of; 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-152413-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152413-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id op53-20020a05620a537500b00790676ab6b3si1558302qkn.691.2024.04.20.18.07.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 18:07:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152413-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=x3W1c7Of; 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-152413-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152413-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 9720B1C206A0 for ; Sun, 21 Apr 2024 01:07:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 905221BC59; Sun, 21 Apr 2024 01:05: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="x3W1c7Of" 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 4578119477 for ; Sun, 21 Apr 2024 01:05:06 +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=1713661507; cv=none; b=P3fTi/l74W8KOC9YfmPPb4n0DXiTu6sY13jkCsMSDdW1Ti8dwOkSx+CGHINflESNsLZcGBD6oUL423YvjFFChyEZkxoXDcgloEYE2jx97mDyihvyJKWC4PnZWaB7/hrLECKXbNGCnP5DRfHFgJPZTMcJBHW0zoYdNQwYZTbP9cc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713661507; c=relaxed/simple; bh=wcB/ebDhkfkPBVDQxoUt3AjUlhzpSXzz59SF5DkeLyE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZV0nJSy6irMu7i7alOAxQFdxgG9BOlOjrAuHAepigE3xh0CxS3XW4dD0J4Tt33Pej0xM4kYODS7YTnx8+HKylGZu26OZY7mCMjdu1hrlivxW1VbBR+qRby5WscZMN8apsP5J1sMtwj4BHq3dB2jw94f50+sJgCB5NfG3ctMVhvc= 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=x3W1c7Of; 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-22edec341c2so1781403fac.0 for ; Sat, 20 Apr 2024 18:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713661505; x=1714266305; 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=x3W1c7OfKrxYrdl53QKhXwkpvo6byzXT4tobcLGo5HPyo0nQzHPhJ0AYOu9kdhjCuw Ce7jP2bH+UdwZz9vVppnwO2Q9QaSsOPfKvIwyt14x6nYG9OKYXq9w+fZ83iKGk6/VwqA gAo2dZv3VyPWGp4BRU/m3V8FImRInf0xv5Xi3gLIJ25QWEg1DPJ99apSm6RCEedbVZk3 QySFE9HMgMaHdxUSdBQcaHHNPuaxUE5gAky25XIpJ91fLPFeHKPsyq9xiy0nOSi9o01C a/RaCJJ07BS4ltCkZBim7VUPTkz0a7taT7XsMIzASa7cnh5/Tnyo0BbiMkmI5v/8wzoO 2HKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713661505; x=1714266305; 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=V5xuPK5Bz6yytRxXyMKM00QCabacxRLThgqq9gYy0vpmUDdwJOEYwkvuKfph1Tekkz xKozyqR/9Y8d49CTso4fGFBlN70kdgOIPE+eJQTDy2EpBa/PPIIp5dYCheOydyNeS9eI Qeb7jPrp52fqx7pRzgoOuL85DvBQ0p1OWbGgdAZmWbTbhHcMdnSmN/Zh2HacX6TLYGPX SrtVgwKb3nuygqaJgK72ju4t9x9jcG2naxSI1nfuERsE5CDzzHbCXTAAJyXv0c2gAMM+ DxoK5TNJ+IAIdji7Gpk8tkU/mMChNW11TPVtCiHmFNMxtRfTID/6tcHAb4/ydsiCFivF TXvQ== X-Forwarded-Encrypted: i=1; AJvYcCWwypHPVeWvZproq0qvTWDnaz+aD0RQk1pcaef+NW2FmIgp3OmNqtfizOKcLmeb4z+Lx2dtoZc9TM2n4ZrayBiQEiNc1WaTaBNIoHfA X-Gm-Message-State: AOJu0YwoYCv2t3Mq7fm8cDQfjyA25eS7UVh3EpgS9CalhCvpDkPcykqK 7H9E3iWhI0Dvh9Hmcfz/YZj5BgTo1CtRhG+UbJk77fZQiX2J18VUxeWWUlxhe6E= X-Received: by 2002:a05:6870:9a0f:b0:239:8e67:6f10 with SMTP id fo15-20020a0568709a0f00b002398e676f10mr5008737oab.30.1713661505412; Sat, 20 Apr 2024 18:05:05 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d6-20020a63d646000000b005dc8702f0a9sm5249627pgj.1.2024.04.20.18.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 18:05:04 -0700 (PDT) From: Charlie Jenkins Date: Sat, 20 Apr 2024 18:04:42 -0700 Subject: [PATCH v3 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: <20240420-dev-charlie-support_thead_vector_6_9-v3-10-67cff4271d1d@rivosinc.com> References: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@rivosinc.com> In-Reply-To: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@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=1713661481; l=954; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=C7F1c584ODJM4qF9TPT5kMoM8fDlOPYyEMw6010Mea8=; b=7jmS1W1m0Q0AzX4wBIry9EylCG+Y3NoCPBcfRTlo9XfCGTiKUGeLKVQZD0sKpe6MXP57BC0/G 7k6iLclC9/sAQ0QerwrjVwujrLIbftuilh6gclJQQmbPMW8YDHcSlr5 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