From patchwork Wed Jun 19 11:35:16 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: 13703730 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 AF0F8C27C53 for ; Wed, 19 Jun 2024 11:36:14 +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=pRf87T3MXssnWdXktQZOz2nrB7k8cdBojK54EAqB94s=; b=xih6hFV2zIAsZP 6/qXGm0d0/7nm+oUNZo7KBm4Z0CEpANi6PTXEslJn9l7dCQ48irvtTAKcy0X0G+qDuUx2egxUVVmJ gHcKEslsnKKnkVMinFTSCTFEh1c4EqUbClY6LKWb0V+gZ49CibKbOITLf/LMYrJrSkot2RMlnqzl/ matdRMe4EARr8pk1K+um6wEstnA0XehqgFpaq/zzuCMQculHiHo4EuxqXfkL5CekiM7Qer9Lkq441 ORAv066zrBheXEWRKi67X2QnKeX5cvZSVvQ1BEXP/uPzWtun5wyn7GchYmAXMSwvml2ZcUi3HlQUu gzAJxinHez/syhu4spIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJtbm-0000000105O-3BTP; Wed, 19 Jun 2024 11:36:10 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJtbM-00000000zfq-2GUm for linux-riscv@lists.infradead.org; Wed, 19 Jun 2024 11:35:50 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a6ee5995549so69880366b.3 for ; Wed, 19 Jun 2024 04:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718796943; x=1719401743; 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=3zBoSU0Yq+Ugqb2C3LqSBfjcHhvTu3SXd5PthuDFsoQ=; b=SacOf5O0EtFtUweKWOcvonMUmlxETdOWAr4u87IeITfTK5aLwZ7aNaCI9IhAoRkCYj U2khotpaNs3SRvZjjY9H+tIpjrAUXXf3eLU5PP8PEcvsHFtcdjOYB8P4pqwg91rUCvz9 BryvwAnnUA49/DRfynbQn1+OLgtlY1avOE5keo9zT6vZRegVpPtLPqqfO9VhT4Tpjmc8 4D9Lb1eBKeEVyrUXYKTaDqEfUoFrB/0v5xz8j9s/GWveM/FnbuFuAWOgIVpGKpSh+avV 9pKcTk1cJ+H2cjvgnBF1w3rJy8jjFd2m8xvK/nQUwOgK7zUJ+TiFHmVxUjfIqy38Mezd YF1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718796943; x=1719401743; 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=3zBoSU0Yq+Ugqb2C3LqSBfjcHhvTu3SXd5PthuDFsoQ=; b=KokN8MJWyDAUO6pJnh9dnk/dJgu2vN5rC6ZfxTjbs0lkWnu5ff3T3OkBu0tuCAjqbK wz2EEhWydHADYHey3HqNbs+JwwcBSAPm3gaHWYa3YOurFxhgSE9XnqGslPGdblCOj4ck BFu3iDpif4F5RDy44CJjQBAPNdMg7BpX2CkdyO/iSpvF4bIpdVVzaS6rYXj93mSn/gua SB4qEn+drUOPL81EN9lGDGbvs+gBxQGwAj8dEyZjTFKNf0F5TCzd2bZvV0kOsJianvQe mMRCqqkoKUTb1eoDIeZyz7h0CpFOxzee365ovga+Ru76D0DupmYnulrV77shCg3V2ipN RrkQ== X-Forwarded-Encrypted: i=1; AJvYcCUJGJ1Y9cYlYncso4eK9T6NDvfq6bnQQnRwQdcxEXViax21Ujr2wTgUideTtB0KeBHX01pdErI43oAvKidt5cy0xPizndSO3bbCJKHpbMrb X-Gm-Message-State: AOJu0Yy8nHkbbV/NGOGBRA384/BQ1zyk3Sx9/nG0HYNj7pyIiqXR5Y4q aICiI0XuX4xaSX6C8LzhvbDafbT86A43+Kp6JYZmyecs9i396gXobUWarJrhTg4= X-Google-Smtp-Source: AGHT+IHoW1UfcptJKJbUfHf0FTH+sEhONquKrK5L/t4dwXUtj8o41zbe9SSO2B6QS2dtbEZsYiMHBg== X-Received: by 2002:a17:906:4fcb:b0:a6e:f419:5456 with SMTP id a640c23a62f3a-a6fab7d04e0mr124124566b.6.1718796942951; Wed, 19 Jun 2024 04:35:42 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:e67b:7ea9:5658:701a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422870e9681sm266192075e9.28.2024.06.19.04.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 04:35:42 -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, Conor Dooley , Charlie Jenkins Subject: [PATCH v7 06/16] dt-bindings: riscv: add Zca, Zcf, Zcd and Zcb ISA extension description Date: Wed, 19 Jun 2024 13:35:16 +0200 Message-ID: <20240619113529.676940-7-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619113529.676940-1-cleger@rivosinc.com> References: <20240619113529.676940-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_043544_801178_B603F58F X-CRM114-Status: GOOD ( 10.68 ) 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 Reviewed-by: Charlie Jenkins --- .../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 e214679ab6da..e34d06633278 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 @@ -519,5 +551,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 exist 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 ...