[v2,00/10] RISC-V: Probe DT extension support using riscv,isa-extensions & riscv,isa-base
Message ID | 20230629-rebuttal-vagueness-a699deb7c7b3@wendy |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9486821vqr; Thu, 29 Jun 2023 01:41:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5QSX/HZVPgm9Vz6E4mIdonG9lxzvaNNImn/iqidvNZzKDoWpxmni8PvwezVHN92yu+52+E X-Received: by 2002:a17:903:338d:b0:1b8:17e8:5482 with SMTP id kb13-20020a170903338d00b001b817e85482mr8555095plb.1.1688028108928; Thu, 29 Jun 2023 01:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688028108; cv=none; d=google.com; s=arc-20160816; b=sFpCjCtmsG+qAJxghaQi1jIa4DKulB4KYOSP+vK1v7BON2+7VtjJSpfw5KJrscHRb2 pOlxIT3Bq95RZbBe3bjxrSu756cgrS5vVycLIqoP18RVcwG6YkifK1briwBa+CibpV/b XJz4igfvTKGQev6THIAKfuNzXsI0IkgFdOXhTy2l/O4yKCxIJOPUJnGfLI68v6PzV6FW f8yBSa1zbir2F1B7wd4S/zRfQrTEmELW4hxiDxLkJooYwyYXxUtck/obQheXeSE8xN9V IaYP3TJbklJWtqfrTBvXaWjS3ITbjgBzKshRgMuwEqvs+IW0MnXWwOZ3gO5N0OhQex6f BOlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=R2ygfRluC3u06Ah7sVk4Htdtzw+72+TXAipxix4cY5g=; fh=id5NoWTfrmVnmm2w/Ed5X4erHGUuViLdGWw+WL1NNbc=; b=eQl2PhJot06JL4rs00htBLvEti+Wru0RiPTLYn3V3g+46jojXNjcHDtjIlMw54fetB RR9z/a/Wg7sfY3O1tWJYtY4rrIk1YnFpYniLwz0+TXO4lagrn1esPrf0G0LMpkkyagVE zs9PGDqD7gQm34t6G9j5EzNfZQ2SheZuz+Wzzraux6qmfG8r7LQh/pQFNwKN+pqi3eWR upbIqt4T1Z7iKxTEcoxVUeYuhV87Vveh0pismyrcn4gB5y5RMrSsZfBUnmQNguwakMcj u0pMjwBUZ9XGIe99Sl/uwaowqLRSCM427ionXWJE+Ojq2SKHyc7tck90lwyy+7ydfUT9 Uoww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=12KX6nuJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a17090311c800b001b52ca9f711si10665307plh.585.2023.06.29.01.41.32; Thu, 29 Jun 2023 01:41:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=12KX6nuJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232821AbjF2IcQ (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Thu, 29 Jun 2023 04:32:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232689AbjF2Iaf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 29 Jun 2023 04:30:35 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 379981B1; Thu, 29 Jun 2023 01:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1688027434; x=1719563434; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=KZlJAN5cRFkMBY+OE7iYPyyn0+Rt2+bwI5SCEwY9G6w=; b=12KX6nuJClfxgp1paKDw/O34ndtERYEHGsVP8XULPGUuPKiT8vsH4DYs zmLzbAmE10dtBOe8dOzrwrIas2MjP4zMPuNhuXzYPrBpQ2j1RD+wGSUhK 5+79LOuqjCP/dF8NO6G/SUro3fe4hJEd6mPdkzt2X+4bIsUE8oMroI8Lf ZvG3HcYGihIddMJh23RAwJ4N19cTyhlK+ZLij2jUWCO0oYRXCVAa0UFl9 LAi3Z9RAoigCfpUWbR+2GGKYu59HpV0fgwNfEdN4fplDoK+wCrNPQo0/W Tyi3Lu24x2vEvqoTxVG0al2StrrC1zIJ5TB1EbkiWvh10sO5fb1DN73h4 Q==; X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="222438401" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 29 Jun 2023 01:30:33 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 29 Jun 2023 01:29:47 -0700 Received: from wendy.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Thu, 29 Jun 2023 01:29:45 -0700 From: Conor Dooley <conor.dooley@microchip.com> To: <palmer@dabbelt.com> CC: <conor@kernel.org>, <conor.dooley@microchip.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Paul Walmsley <paul.walmsley@sifive.com>, Albert Ou <aou@eecs.berkeley.edu>, Andrew Jones <ajones@ventanamicro.com>, Heiko Stuebner <heiko.stuebner@vrull.eu>, "Evan Green" <evan@rivosinc.com>, Sunil V L <sunilvl@ventanamicro.com>, <linux-riscv@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v2 00/10] RISC-V: Probe DT extension support using riscv,isa-extensions & riscv,isa-base Date: Thu, 29 Jun 2023 09:28:46 +0100 Message-ID: <20230629-rebuttal-vagueness-a699deb7c7b3@wendy> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2381; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=KZlJAN5cRFkMBY+OE7iYPyyn0+Rt2+bwI5SCEwY9G6w=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDClzHQ6sUZ67SmqNvMmMG9E6TdErs2tDlNre2DdU5QauPux1 RCOpo5SFQYyDQVZMkSXxdl+L1Po/Ljuce97CzGFlAhnCwMUpABP5ycHwVy7+XkjYS6+NnC/eOz6O+p 8+k+Ov1S7hneVrmIqWXX4lp8nwh+NyhL7gbKMN3G8bNXeL62yIUp187NWfH29Pznr95gDzK2YA X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770025762668551698?= X-GMAIL-MSGID: =?utf-8?q?1770025762668551698?= |
Series |
RISC-V: Probe DT extension support using riscv,isa-extensions & riscv,isa-base
|
|
Message
Conor Dooley
June 29, 2023, 8:28 a.m. UTC
Hey, Based on my latest iteration of deprecating riscv,isa [1], here's an implementation of the new properties for Linux. The first few patches, up to "RISC-V: split riscv_fill_hwcap() in 3", are all prep work that further tames some of the extension related code, on top of my already applied series that cleans up the ISA string parser. Perhaps "RISC-V: shunt isa_ext_arr to cpufeature.c" is a bit gratuitous, but I figured a bit of coalescing of extension related data structures would be a good idea. Note that riscv,isa will still be used in the absence of the new properties. Palmer suggested adding a Kconfig option to turn off the fallback for DT, which I have gone and done. It's locked behind the NONPORTABLE option for good reason. In v2, I've also come up with a more reasonable name for the new function I added & fixed up various comments from Drew and Evan. Cheers, Conor. [1] https://lore.kernel.org/all/20230626-unmarked-atom-70b4d624a386@wendy/ CC: Rob Herring <robh+dt@kernel.org> CC: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> CC: Paul Walmsley <paul.walmsley@sifive.com> CC: Palmer Dabbelt <palmer@dabbelt.com> CC: Albert Ou <aou@eecs.berkeley.edu> CC: Andrew Jones <ajones@ventanamicro.com> CC: Heiko Stuebner <heiko.stuebner@vrull.eu> CC: Evan Green <evan@rivosinc.com> CC: Sunil V L <sunilvl@ventanamicro.com> CC: linux-riscv@lists.infradead.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org Conor Dooley (9): RISC-V: drop a needless check in print_isa_ext() RISC-V: shunt isa_ext_arr to cpufeature.c RISC-V: repurpose riscv_isa_ext array in riscv_fill_hwcap() RISC-V: add missing single letter extension definitions RISC-V: add single letter extensions to riscv_isa_ext RISC-V: split riscv_fill_hwcap() in 3 RISC-V: enable extension detection from new properties RISC-V: try new extension properties in of_early_processor_hartid() RISC-V: provide a Kconfig option to disable parsing "riscv,isa" Heiko Stuebner (1): RISC-V: don't parse dt/acpi isa string to get rv32/rv64 arch/riscv/Kconfig | 16 ++ arch/riscv/include/asm/hwcap.h | 16 +- arch/riscv/kernel/cpu.c | 158 +++------- arch/riscv/kernel/cpufeature.c | 507 +++++++++++++++++++++------------ 4 files changed, 398 insertions(+), 299 deletions(-)