From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC285C3DA63 for ; Wed, 24 Jul 2024 19:14:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=alKt62dpOT1KD875EgnNayCq/Q7UHyMp6gqX/eipFkI=; b=emNuD/J8dvBMov CUQnKVC5UmXuewJWkgFwUpI8TyujYRNPKpefiT5tcIyUeQzmQf2K7zl71dh3DidmtIxsVJ124PuXk ENNF5IWGwdn1bGtjGtT9+DvLX8rCs5QBCDATIhxHzlH/Dy3YJM24DiGP/4Rhl6YlcSahe/AsfTcvr B/cWcelz7Y2jz2/VegVuJ3p2Me0Z4crVIhjKsilv+nBYXxVohuZT6T5gcOymJUdIPbe9lDwBrkXWZ HANGZi+awUP/6TmE8PI3IlPYJMVSTXDr5d4vA6O7haS+GJFV+5vMl4B8G/Ag7JIhARJrYi+yjiKfu uZT7LiCyPb/XH33z+W3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWhRC-0000000GIbp-46Kc; Wed, 24 Jul 2024 19:14:10 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWhR8-0000000GIXw-26Uf for linux-riscv@lists.infradead.org; Wed, 24 Jul 2024 19:14:09 +0000 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-2cd5e3c27c5so117638a91.3 for ; Wed, 24 Jul 2024 12:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1721848445; x=1722453245; darn=lists.infradead.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=0RiVgzby/fIL0Kxxx3Y50ysZFHbsEJYdDMqDhTheyzc=; b=AfcBwPeGfD27lZUCB04pvrpTSPvr/NtP1q4qvzEZKgmy7oyGv7zdwV3Fb+vo/d/bMB 57mkhuapWYrU5Zq2WVyKcPF86iMTIYDVxEGB+rvwtFcBNx3+0fJw6KpGiZKxOPExFI1I XROKO4Y0iD/SuHOnxCWKRwF/PK7UwCFkghSUGplx9AFI+rNgJd/Y44F1TFqcgtVCXK4+ 9A60PAokGfuBp04smZXxFxoyC+nYMQ49gYCe0SAY08koq+xbnPa0OaYgnNIJipPFsXNw 7HQWcqywxKxP5mqPFX0sXwJ3q/84NhsFW7MlHSpTGZvUuxhXziHh16haTZSsyRrhEgHO bvNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721848445; x=1722453245; 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=0RiVgzby/fIL0Kxxx3Y50ysZFHbsEJYdDMqDhTheyzc=; b=rNxGKDNKmmjYaTzSIbM9Q+ZVBLIX60UBMQtIFZ8VzzUwrPcrUIHfvlJLmNbZ95ntY5 5kkJt+eQcWwhMJWTkPWll9/PP9tYb0QJ1qWyJvgjPhp42qhSS35zaFH5c9jdZMmm2dFx eslSreSCIFpbmoKCEB6fi23Pgao5mMPoK5idOHPTnOJI+tn/Z9tV++GF/TutwRwyxTHP md4F113lU1pwa6YRHNl5j971EcMWN4XYVSxxOkI9z1GaEMvbdGr3ke1ewvzKi9LOxdnc kKEBGUg0nmanWGndQImtTsugE+Iinv8BAsf+JhpWutgxTVCXQyf5nTTbewpEZYeODf+g KuLA== X-Gm-Message-State: AOJu0Yx13amJaS5DzuUjL62Tc0bTF5giOgb4JYY3rVUz0hJRffc8nTZm uT+EgCdYvpMNPXfY+s6xZngS4ls9l4Nb/euLEwIsIHHyTxiMyfkR9JoqVnWcykg= X-Google-Smtp-Source: AGHT+IFx97Y0cC+HCH9nA4VAxFdhc94zzoHJto1hheIT4Bw8Wii3Iml1nv5bpeIsbUYcqNFP8+VQRA== X-Received: by 2002:a17:90b:1201:b0:2c9:9530:304a with SMTP id 98e67ed59e1d1-2cf2377043emr528027a91.9.1721848444737; Wed, 24 Jul 2024 12:14:04 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cdb73edecesm2022359a91.32.2024.07.24.12.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jul 2024 12:14:04 -0700 (PDT) From: Charlie Jenkins Date: Wed, 24 Jul 2024 12:13:53 -0700 Subject: [PATCH v7 02/13] dt-bindings: cpus: add a thead vlen register length property MIME-Version: 1.0 Message-Id: <20240724-xtheadvector-v7-2-b741910ada3e@rivosinc.com> References: <20240724-xtheadvector-v7-0-b741910ada3e@rivosinc.com> In-Reply-To: <20240724-xtheadvector-v7-0-b741910ada3e@rivosinc.com> To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Samuel Holland , Jonathan Corbet , Shuah Khan , Guo Ren , Evan Green , Andy Chiu , Jessica Clarke , Andrew Jones 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 , Conor Dooley X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1721848437; l=1911; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=lK25kSvuXBbjCsm1KOScKY69sa4rMHinL5Ye8aockR0=; b=CjHZjgnqGNw1RWWuMeXL+h4ZRUcHluI9AgBOflCAqUrmXobpkFE/dlpLH4t3NW1vya+Q6wmXZ d8LozeuyiSNDhlJBwI2X3rx31jTWd2nbsaHEp8waveombqcpV2ALPOC X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240724_121406_620567_431740DF X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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: Charlie Jenkins Reviewed-by: Conor Dooley --- Documentation/devicetree/bindings/riscv/cpus.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml index 8edc8261241a..c0cf6cf56749 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -26,6 +26,18 @@ description: | allOf: - $ref: /schemas/cpu.yaml# - $ref: extensions.yaml + - if: + not: + properties: + compatible: + contains: + enum: + - thead,c906 + - thead,c910 + - thead,c920 + then: + properties: + thead,vlenb: false properties: compatible: @@ -95,6 +107,13 @@ properties: description: The blocksize in bytes for the Zicboz cache operations. + thead,vlenb: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + VLEN/8, the vector register length in bytes. This property is required on + thead systems where the vector register length is not identical on all harts, or + the vlenb CSR is not available. + # 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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv