Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1564384lqm; Thu, 2 May 2024 21:47:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQl7R3H9DUi8d6lBMsgULu4GnWRkTRjASxKjpRG63xje4MnMvlBuT4aLcAS6xua3sZ7iNxZEUqVFNIzakURcbD0niA5iP51dTnjCoQmQ== X-Google-Smtp-Source: AGHT+IFrjQaEd/QD5WTVEQRL4ZlnAcUqTSHvG+sqJg6jMOnFqVD20IREMPanL416GCLDy8lK3Jcv X-Received: by 2002:ad4:5f09:0:b0:699:2cd8:4d83 with SMTP id fo9-20020ad45f09000000b006992cd84d83mr1621386qvb.29.1714711657208; Thu, 02 May 2024 21:47:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714711657; cv=pass; d=google.com; s=arc-20160816; b=K1QpzxEpK2C3vXr1FZa3dn2/sIZnt0vf14ko2Cnfw7G4S2C65x+ATrQLKTuauls1bj P5UFsFwtFNVvgC3aY7OoBi+2Dmw8OEeEhBfUJuYxLtdS50bPXhb048At50fmhn9DX+4t SGK49UVp8JzZ6+fk6zKV5CfFzZcYU9y1HKXcL9z2IM5b8zSi5btx//LmEOLQ+qZyeW3r X9mI2deubbdNlQqJAaKagalaXFN2NVAWqVSzqjf3xNg/V3wE05ScoMGIxQAi+T9QArlj tbpE8DAUVwYPTSaDxVrOMu3ml/Ddci3080WEhZGN66pF/TYYATbgXDCAlsPRQbCUzaWl rw5g== 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=+VjeHR1eFFL9Gvz01+9XywijwOrTXSU/mr8HqBxiNzQ=; fh=Ky0w1udfglf33ILptRHTjC774y0TQZ7NIi5Dcd32fnQ=; b=efjHfCMSshi/R1q86VQ1sHsJUxXgawQVt6C+ccvCr28H3jqwsowKXltBqOyJP+mAr5 5VCySHupa6xEABFXjAmtbK9XnshtpW9gTTgWX0vAyiV+bp5M8kf1xDx7PCOUNKiPIcP7 PP5jnTjGS+0ghJdHkoib3uwM2zWgAXl7goRnsksPd2A/m5BbqZCyxg234BZ+x2pdOR9X XhBXaadZ75hxCx5J/Q2a/do2n9zvLl7+HqTUecCAg6ZHi4zIWmWKnOd8Fy3s3ITYAf63 6alf6t9SH9uMyw/f6aj8gyNYerfjLz4HJAammzZhLHqZLNeW2UYkYIF2BMjtc9GJn40V dwwA==; 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=dRLkbyXZ; 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-167233-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167233-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 r12-20020a0562140c8c00b006a0cf26c9ddsi2505480qvr.290.2024.05.02.21.47.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 21:47:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167233-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=dRLkbyXZ; 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-167233-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167233-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 D79E81C21525 for ; Fri, 3 May 2024 04:47:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A97A4139D0A; Fri, 3 May 2024 04:46: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="dRLkbyXZ" Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (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 184F213959F for ; Fri, 3 May 2024 04:46:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714711611; cv=none; b=RMGccGVxTjLA97rMlcKf3mjcSwXfTG73OU9+iK5UpFPSpAqVI2m3ryKr695BNgV1FpQVCnDKXWl/Ugd4p8JNHpW59Agm+YqLCfGSVvaYd3F/bx7/sVWQclAVCBafQ6ri/YWOp6dz/s9XgFNtVYAtJLqkE4Ji3WYjXg6fiH+Pl+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714711611; c=relaxed/simple; bh=PDP+pfWfSCvmvZn17Dj5qqvNgRLWprJakVgT4fj7WMs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mThv/Fxb67KDp5tPTcJpS6tCIREgIDWadbpwyzTjq2usd6WRxyVC0KLy36xsu18UsxcVzhvu//eAXbRIAn0wzCxZGnuxGUCEOUdGk+xlT0oSc3UA6wdDbvpGw/VDbJAQ9O/o+j3ZQBYarQFYQ4oRrnQMBN2eI0SdgeTQDuWMwpA= 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=dRLkbyXZ; arc=none smtp.client-ip=209.85.210.173 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-f173.google.com with SMTP id d2e1a72fcca58-6f44e3fd382so45319b3a.1 for ; Thu, 02 May 2024 21:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714711608; x=1715316408; 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=+VjeHR1eFFL9Gvz01+9XywijwOrTXSU/mr8HqBxiNzQ=; b=dRLkbyXZ0tAXoqkBWpuTw3doyJopIpUyReaPZezuTJNS2n/czUL+l47YA6yLKa5kx2 whSJJrnB7AB4EGzOl5ztTsygAvABvzeZMf1hZu6O05ZDN/c1ewRQbKa6HlvQMEJLzX4Y WBxtkXCLiGa0kfmyigI49/xpuN8FFd1U6woz3JQXzBfHRIpY9SK5GLoygV7pceRat70r 57hDRv2S8GlBk1bdBRxsr+SHw8VoBeD0oX6hdK9EJzGiyKU1uHVhOcVh3KuYceHLfFSV ZCyke26lEQhV3EWoswcg1cvH+tsCuAAlTV7AYiU6aywU0lN85EknzAacmiAqO1vKOOaq cuXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714711608; x=1715316408; 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=+VjeHR1eFFL9Gvz01+9XywijwOrTXSU/mr8HqBxiNzQ=; b=eKj9DXy/xo3LqoaI76IJR/T5BZHWxKfN1WaDhevrd60lTHVrbM0hGxEKB9vvBrk7s2 XxCygUoJYEFyUTnmxxA8lFXID75s0IqE8vt8JkN/DU43g15aCiiC0oOXu1gCTpCI6rjy /nIvwlyWBVM3jZb94aaro1JdGMmE4qaHxWqp8x5t6EulX0vYLDYdjWeP61q81GRxa6ZA jYt/zQUPeV2lQ6kfI3Q7AZ5rgr4MiO3uDN0di3NqbBP95TGQv0vFhNsmR9KqFhCi0cvA MYhQLPSEBIHgM0bbjAMGd6KgRww4QMUv/jdEqaTeULqTOHEIX3rQ8JgYf2goqrEFLORF sKgg== X-Forwarded-Encrypted: i=1; AJvYcCVLfOE3dlLxrenJTx4lxaBdFiWO0VgGVGwgN6iCu0gHp0mIVC87rpeAXZ/BEtY+pPBfW6io6zXMw+5+tdjKeSzp/1CwGpCvUEDMSfYj X-Gm-Message-State: AOJu0YxOX9X4srAfYuRTT8DGDhNc99eYiEjfztWK3GO4Ze0+tiPBh1D4 O9KU8ghXqjRniPG/sPr5OtHra9K06pxYtpFmRaaG520Ms6ND+YMwf3fTFXh9hqw= X-Received: by 2002:a05:6a20:8413:b0:1a7:8a02:3058 with SMTP id c19-20020a056a20841300b001a78a023058mr2053596pzd.12.1714711608331; Thu, 02 May 2024 21:46:48 -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.46.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 21:46:47 -0700 (PDT) From: Charlie Jenkins Date: Thu, 02 May 2024 21:46:37 -0700 Subject: [PATCH v5 02/17] dt-bindings: riscv: cpus: add a vlen register length property 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-2-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 X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714711602; l=1443; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=heJ5mXr7Tx2wdFjG631ibJba5Q6SNbmXVyEpdKm9JEg=; b=oHDMK2MPe/lkNi4I1weAEI6zuYQ8edaqMwBunYR8EtuZeYbb3YWhKVd0K0WCUGyV8ctpL28Y/ fK0GFGbIuFsBkiUjtXJZg2jRDSbNRJt95AMJxOSvhqumeibiNGmllJn X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= From: Conor Dooley Add a property analogous to the vlenb CSR so that software can detect the vector length of each CPU prior to it being brought online. Currently software has to assume that the vector length read from the boot CPU applies to all possible CPUs. On T-Head CPUs implementing pre-ratification vector, reading the th.vlenb CSR may produce an illegal instruction trap, so this property is required on such systems. Signed-off-by: Conor Dooley Signed-off-by: Charlie Jenkins --- Documentation/devicetree/bindings/riscv/cpus.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml index d87dd50f1a4b..edcb6a7d9319 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -94,6 +94,12 @@ properties: description: The blocksize in bytes for the Zicboz cache operations. + riscv,vlenb: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + VLEN/8, the vector register length in bytes. This property is required in + systems where the vector register length is not identical on all harts. + # RISC-V has multiple properties for cache op block sizes as the sizes # differ between individual CBO extensions cache-op-block-size: false -- 2.44.0