From patchwork Thu Apr 18 12:42:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13634674 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 BAC08C04FFF for ; Thu, 18 Apr 2024 12:44: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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rpjKXLO5Q6SsZKaE3AH0eTr2hOj6DhjDDic3317KYkE=; b=sM77fmr8ibnB/8 ynlI0wtgdkwXO/tKGlZUVvtvyjrQEouILCES9IEqdnOjVdMy0JLeWOHsHyMhcEqaEZRvV5Gj8GLmU VXVXclHKx2dzTn2UhvXNWcpRNAiRgK5C2nMeU9Fa1/g8Y2p93bfrdE7VmRvS+F3MaQCArEscvHCgk JGr3UzTyAOwI2oe35pOlLAZ1Bayzc/ezyKvBa3DWmoGX95vsv6JcAl7zfL2uvuY7U/JA9q/fJbnvm C+zq/Q76+x0hlf+AI+Au0Hu4kcD9tfjSAf2dlz/Hf46cGIcwAqPlE64DiHaBylGSBz3vnYfN9zaZ7 PLJucW+0JSC3VAX7rXSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxR7Z-00000002CZy-0FYr; Thu, 18 Apr 2024 12:44:09 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxR7Q-00000002CRJ-0O9o for linux-riscv@lists.infradead.org; Thu, 18 Apr 2024 12:44:03 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-347c6d6fc02so116276f8f.1 for ; Thu, 18 Apr 2024 05:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713444235; x=1714049035; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zrjU6l9W7DikYIaMYJG/SdZ2oUTcGtwCnDHe7Ekc7IE=; b=NuWAM3kDbx8VequTg93+Qo1r4b7sTaAVBx/d0NmHVpQhg01ajHoXxXCUclA8B5C+MW qi1py/TVNEcX8LeB3tKeTKdhnbVrId9Laxd6OROuM+dVTE0bkoyPM7WYC2tmA+Nfyae/ kQQI1I60so8otLtVH34ANkyB8RfYSWa4zKBa4Ob2HmTvj/8wF0i/gUQCYTQbfspNlgfN S49dn8svv0ZJ9NCX1PpIkg7lJ3nWjkCggpb9/PGD3y5D6SbBRm4ZRP8zN8s04C1+3eF4 lw9Q0Z82tAJ6ZqP6/uRapxX5zDaA58LS2IrZ4v8fYDf1BnQ3Yr3NswJ1sB9q1afATDBj rh4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713444235; x=1714049035; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zrjU6l9W7DikYIaMYJG/SdZ2oUTcGtwCnDHe7Ekc7IE=; b=cRPFznlH/WYgSbRy7/+pN8TBDquH6lbXjfDtGTjSxUh5RXyLYnQbjTuNCP3MR4xTs9 JmDWCrntm6plrSVie1d6XZZfRV6palbme2kWd3hyXK2eXdysAlen+eHGdTq8ci9JWxWp tF1aZ5hzWWg1f7Ahx6E3jjdx6XvW7BSoSnrQmI+YL/q2vaigMwlB7pH1dz8HfTPKJA1S yHs6jaStsTgJn6XInuxfLBVVd4u2SOtCXq1zJn/zmEojrCU9hlTPF9QCU1N4CaTRWfl+ iuUcpD1YJJDCx/8DlTcE/lKC6U3HI/A0JhxdnvR6oSDDXt4lWPnzBiU17/lktMxivUhP Iu5g== X-Forwarded-Encrypted: i=1; AJvYcCX8bMn0GH+s2t3YDERzlhrdxbsEaaptyxmzplGphfm+Jbbm2by4AxZZYh9Z0mxOT/I2/9Ce4gsADQcwqkRm95F7YxWLZZWuyuZ9Kv6iBS5w X-Gm-Message-State: AOJu0YxtfpNCR/dWvLzSIncuHfT+avVtBp48DfLrCeuw/bMHVyohBuLQ eK2Pg/mPc1TYoj9/ho9cb6osmm0kHcbQAtCxMa7PVK3NmZWLxOnGwomdsv29/BI= X-Google-Smtp-Source: AGHT+IFFx4DMJCN/eGlinw4D8WxSb2s5Led6zbc0ypunbHRPKVqfx9J88kY5VuS8nvJuPPTEq99jAg== X-Received: by 2002:a05:600c:55d7:b0:418:ef65:4b5f with SMTP id jq23-20020a05600c55d700b00418ef654b5fmr805438wmb.3.1713444235113; Thu, 18 Apr 2024 05:43:55 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:7b64:4d1d:16d8:e38b]) by smtp.gmail.com with ESMTPSA id bi18-20020a05600c3d9200b00418d5b16fa2sm3373412wmb.30.2024.04.18.05.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 05:43:54 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Atish Patra , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 01/12] dt-bindings: riscv: add Zca, Zcf, Zcd and Zcb ISA extension description Date: Thu, 18 Apr 2024 14:42:24 +0200 Message-ID: <20240418124300.1387978-2-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240418124300.1387978-1-cleger@rivosinc.com> References: <20240418124300.1387978-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240418_054400_319807_9B4F36C0 X-CRM114-Status: GOOD ( 10.67 ) 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add description for Zca, Zcf, Zcd and Zcb extensions which are part the Zc* standard extensions for code size reduction. Additional validation rules are added since Zcb depends on Zca, Zcf, depends on Zca and F, Zcd depends on Zca and D and finally, Zcf can not be present on rv64. Signed-off-by: Clément Léger Reviewed-by: Conor Dooley --- .../devicetree/bindings/riscv/extensions.yaml | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml index 616370318a66..db7daf22b863 100644 --- a/Documentation/devicetree/bindings/riscv/extensions.yaml +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml @@ -220,6 +220,38 @@ properties: instructions as ratified at commit 6d33919 ("Merge pull request #158 from hirooih/clmul-fix-loop-end-condition") of riscv-bitmanip. + - const: zca + description: | + The Zca extension part of Zc* standard extensions for code size + reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on + RV64 as it contains no instructions") of riscv-code-size-reduction, + merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed + of zc.adoc to src tree."). + + - const: zcb + description: | + The Zcb extension part of Zc* standard extensions for code size + reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on + RV64 as it contains no instructions") of riscv-code-size-reduction, + merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed + of zc.adoc to src tree."). + + - const: zcd + description: | + The Zcd extension part of Zc* standard extensions for code size + reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on + RV64 as it contains no instructions") of riscv-code-size-reduction, + merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed + of zc.adoc to src tree."). + + - const: zcf + description: | + The Zcf extension part of Zc* standard extensions for code size + reduction, as ratified in commit 8be3419c1c0 ("Zcf doesn't exist on + RV64 as it contains no instructions") of riscv-code-size-reduction, + merged in the riscv-isa-manual by commit dbc79cf28a2 ("Initial seed + of zc.adoc to src tree."). + - const: zfa description: The standard Zfa extension for additional floating point @@ -489,5 +521,51 @@ properties: Registers in the AX45MP datasheet. https://www.andestech.com/wp-content/uploads/AX45MP-1C-Rev.-5.0.0-Datasheet.pdf + allOf: + # Zcb depends on Zca + - if: + contains: + const: zcb + then: + contains: + const: zca + # Zcd depends on Zca and D + - if: + contains: + const: zcd + then: + allOf: + - contains: + const: zca + - contains: + const: d + # Zcf depends on Zca and F + - if: + contains: + const: zcf + then: + allOf: + - contains: + const: zca + - contains: + const: f + +allOf: + # Zcf extension does not exists on rv64 + - if: + properties: + riscv,isa-extensions: + contains: + const: zcf + riscv,isa-base: + contains: + const: rv64i + then: + properties: + riscv,isa-extensions: + not: + contains: + const: zcf + additionalProperties: true ...