Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp289770lqo; Wed, 15 May 2024 14:50:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAdDJasmz+b4e3A8tyHVBhqRdMzC2x6Lk2Sx21RtQPMrWZ1kfz9AhvG7sMhQUPcBuUQuU8TtzgL0sxLyXPtBdN1FAhYg2GeYaOK81slw== X-Google-Smtp-Source: AGHT+IGuHv5sUtl33ygA1fCldLgeOiQjrwLTjU815XmyNizlZllKcutciJ/sf08F5Y3vANElM8qG X-Received: by 2002:a05:6a00:2195:b0:6ec:db05:36c3 with SMTP id d2e1a72fcca58-6f4e029bb2bmr17180715b3a.4.1715809837333; Wed, 15 May 2024 14:50:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715809837; cv=pass; d=google.com; s=arc-20160816; b=xvRS39p3FzpC+KB1M5rGACKLGA7ZRyIkJT/Dz3zy5imDuKXbECXdh9fFjTSrU4AJse cmLounUH4Y+yVCsYK5+noXcpJuDt3FQCvitR2NdBIYQ5TIi6bxtBxMU/IU1uZq1KJ2wm 26aWaBrc0cSTNiCCznMEMgio8sVFAukkEUrkprNX0hUQ2HgjJz8yAzIld33igOQUK0Nd iqRq7N89hchtsSNKjVm5oNDV5AHfBjtQe+mhDgnqE4BZmZdetiNeZ3lFZGwVhiG+7e0D 7k+Pb7i5iQXlfAwzPmvg30L9nXloN5KQGDfl6NUToZGrJ5xenq1o43ughvvv0MZUuhzr nfRA== 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=E5tatz1vU8EY3IY7QTspRov+3ZSk9LJWiz536HxCz/Y=; b=p80Q6kNhADBmIetpYzsMo14RXNqnwWVceS4N+zgk31zQ+G8FARRMYwufHs+Xuxz4lr 5SMWrfdikW3uH76rqg3QNa74Q1D+Ma5UCJmVZc8ynu+VScYCctR/WBo6yNdNqc4+bj6e cWmRJfozn61jLCQPwanMcMnvuU+sQRp6qYV8Hffshx6x2VFm5w4RyBsg+AVblLWWOwEc if9Jz1l5JPam5Pz/zTW72zu9jmxHunUe+d1IPpoUCsFSgv+Ax9b9yXF8QPhuKRMQQdau dbTropZsZEUmiZeTB/MV7xuWoEwUrR77suTHKdms7YXTxU0blQIftRrAQzfQ7XUEiKVk ZyXA==; 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=GPcmlKDn; 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-180404-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180404-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 d2e1a72fcca58-6f4d2aeee27si14372333b3a.202.2024.05.15.14.50.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 14:50:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180404-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=GPcmlKDn; 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-180404-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180404-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 EBE6828259A for ; Wed, 15 May 2024 21:50:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC57C15B96D; Wed, 15 May 2024 21:50:23 +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="GPcmlKDn" Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (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 B09BB15B567 for ; Wed, 15 May 2024 21:50:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715809823; cv=none; b=onaZWDgvybBHufAhDIj2nRMiFfI99KgJiGtk5DA7QAp4cw6RRpHZNY9SodLR1K59AF1AD0mU1q3aBCljEJUP99k8cC7jjbBDNqKX28kgHa0ew75/joX7oV22RvBp4npX3alfhe8mCSa/wF9zpKrzy6IPx1nt0m+HDIyZzXzoX40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715809823; c=relaxed/simple; bh=PDP+pfWfSCvmvZn17Dj5qqvNgRLWprJakVgT4fj7WMs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GSUXbI0nvgg3VgjQEQxiy/7zt35LO5kmp7wBJwh+zwP9FfTal7G9oNLQJXOfBI5GLyqKYgAiivOUr/0enG3Bu0Wrlzb3mbwAnushvNu7mhGNgApD9OZJDrEO7m2tw+0YEhkJeYuBVJWMkXPtCHeCl9SU+wjqpFI6WamcVLRzym8= 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=GPcmlKDn; arc=none smtp.client-ip=209.85.210.169 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-f169.google.com with SMTP id d2e1a72fcca58-6f4d6b7168eso4254854b3a.2 for ; Wed, 15 May 2024 14:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1715809821; x=1716414621; 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=GPcmlKDnM6ZLlTshrz4DoLUD216wAHokLwKjadnd0chOFFJV0uZTwJzLcokAog/hMS fN9MrewRvG85i1/RIfIyFh0c34i1GdgY7iJ9g4VL3gTlauLZnxWZ1KDq5csH12SSb1UM jG0ttHyXQFgc1cX8O8Q1ica0GySfNqymRaE+qR4ynhnQzAc26VkAFqpG1166yCNTqMck YjfwfArZY5ELjbgFFQANipEKH9DMSYM41hhPX7gUnYxAhI1APq2690g2zwNYuPrJLT3E UkQjGiQtoPQFw7czYdIHh88elIVziOoDJP9NrhPrbA1mgYWkzumTUavZNXCsO58q3uqf NLUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715809821; x=1716414621; 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=IN4JEUbiV87vOyHBR9ICfqu+itDLi32tDDM2VyqHJxDz69bkuUZLaleYwQ6qNtVFHI +Ogia1n0Qc1BjxfB1NsFIg6VgV1+OiHPopvtUXFKFqR+Sb4coLmlj+7UBZngUmAtJGpR AFrjP3X4wC8g3tittYaifG/4y2WAPfHJMK7C0noVQgVb0sz4Jp9XQw3Mj2pWtSPl1Bo7 lguB7h/vNmmKGxk2PU/EkSOvhAb9dT92b6xjlu59SlMf+fm9F2sAbImPlj33ols6SP3S q7fUYa9QBiF8FtWVtkWYi9WQpVvJ5c9HFvXYr6YqWaN5MK/lS2Z23hKFGjXE3Xtw97GK g8Zg== X-Forwarded-Encrypted: i=1; AJvYcCWnZ0vrgnwZF/6PDk0lXtpflpcZGe5/1yRuAEnoUMEaRq4fFNqUCMZ4sD16zkQ4sUL/0ndRvPXuJVyuN8m9Zlcl6aY/0XGMisOZLE8E X-Gm-Message-State: AOJu0YwjFDVklagcGt3NI0VdybZ6QU6Rw80gvqxAO14FCr1laMJrOFs9 mxTtZapxuzmjL4wLDOqLZazV0H9Okg2qJvMU66DvC7gBDpfNPOu1bKDcWjMoLbE= X-Received: by 2002:a05:6a20:1592:b0:1af:db2d:d36b with SMTP id adf61e73a8af0-1afde0dc165mr18300987637.15.1715809820987; Wed, 15 May 2024 14:50:20 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a827fdsm11638629b3a.60.2024.05.15.14.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 14:50:18 -0700 (PDT) From: Charlie Jenkins Date: Wed, 15 May 2024 14:50:14 -0700 Subject: [PATCH 1/2] 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: <20240515-add_vlenb_to_dt-v1-1-4ebd7cba0aa1@rivosinc.com> References: <20240515-add_vlenb_to_dt-v1-0-4ebd7cba0aa1@rivosinc.com> In-Reply-To: <20240515-add_vlenb_to_dt-v1-0-4ebd7cba0aa1@rivosinc.com> To: Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Charlie Jenkins , Conor Dooley X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1715809814; l=1443; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=heJ5mXr7Tx2wdFjG631ibJba5Q6SNbmXVyEpdKm9JEg=; b=OabNk8cbio1djlt/U5FF9VWWX6n6P5WbWbhRJmAG1nfw3J1jyCrjDDkdq2E8KtaKRT0aNk1NT j36KygdeOEsCz/srxtO56/4zFPug+AAO7ZrlDW7IcH1IxdkviKKs/Xk 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