From patchwork Wed Oct 11 11:14:34 2023 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: 151318 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp462980vqb; Wed, 11 Oct 2023 04:21:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFh+IkDh261x67+gVJigSXPYTNp7zKAVwKvrxMTyTWQ9N3Z6IsMn+DzoztoyhEItR00LOhy X-Received: by 2002:a05:6358:f17:b0:14d:8792:1cec with SMTP id b23-20020a0563580f1700b0014d87921cecmr13360579rwj.1.1697023318219; Wed, 11 Oct 2023 04:21:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697023318; cv=none; d=google.com; s=arc-20160816; b=0mTFdrRBATLORk2EuCmKyh3MwI6wk6HgyHrZCrdcAze8nYzULo6AdDv4m6De+aZ5ea wk2A6AhgszZl8dUXqHO6AMJUcQXhbshW5FsHWw9Y2O9gW+7lPXOgOQH5oV0RL49PZwF8 qnpOeF1W4JxNEccVSMkK4wUnqFobuzsEknOCIqZzlP4cA7QCLGl0ydqdBtHVDsgrAi/A JoL+zhA3Zvc6w9+r1xL2ikkKUNI7zBRuKHy3v6Wsb+29T1j2cmfQQot1aTuHTLRysgsS gUw0wgPVZ7V5Is16JqAg8q2g7nkoVNrlnkq8JepQbhYH//ae/wd4N2gUNnDm4HUhdpry NRrA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4tXTHfOF9l2oA3bnmaAaKSnwfTQRRdZhw8v+5/SMqC8=; fh=YTBEzcO0MYpF5YfD8pS5vr0pvVavk2TCgoIFkI+x0fk=; b=BsYCpw5MQHCUSUY0sFegMNBW0GAZKBDtm5xAs1dWW6Y5/rQ7uzE05OipVtUxtP1ZDh blc4g1P90DS7a3NOM+ws7mhU7eOGNyYGgpIV+2LcGhUS/Go8SrCj2bG14Hg9ezikNl35 /irSeoWzqEzjgZLUUWM2M2E1ta6vv2uu+wYL4kX0KScq77yCTWdaJWbsn1+/1Zuxm+5U 4VBWDaHux9cgBLKtMoct+8m/M6+PVUNzed2jlE/Bum5a7T1KZXshRDE7EDBPsBOtvEwU /ckIZalFdIJGmuNm15wdsqMsB4MMQzp6aeTVTOQF37bZ3EESI+rkks3sErnP20kOZ0oN qYGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=N04xmegZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id 10-20020a630a0a000000b005859c81f1e9si4036132pgk.229.2023.10.11.04.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 04:21:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=N04xmegZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 67C99808E666; Wed, 11 Oct 2023 04:20:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346730AbjJKLUg (ORCPT + 18 others); Wed, 11 Oct 2023 07:20:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234821AbjJKLT0 (ORCPT ); Wed, 11 Oct 2023 07:19:26 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC7BFC0 for ; Wed, 11 Oct 2023 04:19:24 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40651b22977so11504955e9.1 for ; Wed, 11 Oct 2023 04:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1697023163; x=1697627963; darn=vger.kernel.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=4tXTHfOF9l2oA3bnmaAaKSnwfTQRRdZhw8v+5/SMqC8=; b=N04xmegZV+lKKeXl1ojADZgfRibjKxsCegf6l8KNRpoOGSi1p+Or42fV/6nK/fl4h2 HBnBgThG/fN1Bjk5KaRKmLr34uj0f0UilGBdkXNptV+oBzweekSPUXR5rbsxY5BV7Ct6 WbIdxc9AEVnlTdrDy8sbhRNZCowdQcfB+v++gy7OwlMrdjp/cTzqUiCCf1wSe4pCBxox Yz9tTvd0xDr4+CW1ApvHLDciaffION4EoLEoP02vRAIrcHY7Vd17hAWG40Dt6JwKVhOt 9YWIQyrR32R4gpnAxHXNlUU0scvqrUwR5hVnxx+eGZ9W+IuJzxb0AgeOQSLqglsuxVg7 PGKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697023163; x=1697627963; 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=4tXTHfOF9l2oA3bnmaAaKSnwfTQRRdZhw8v+5/SMqC8=; b=v9qtPCXDgvI99W6Nd44Ea5U01QjgqO3hGVGpRG9+X/Il4aN/mFQ0Qgz55yJQjA+I9M PfrSpN75wHNMwuLTRtW7qQQjCBwYXi9/O+4Lw459zDzHnUbktfZfLUCXKpdVeKRdf3On jTXhWXHRCO0dRVxNY7pNPAS0L3/kxEWMoJfu5nn8Bo+LztwK5XGbegNbrEHhebVyOuTF 3GMkqMZc6cqfFr/ObWYhRXIE1cYrE2g7q+3owLhr48/63MGMbmTCT3nkSAzusn2DbfHe wmoopbaiMsb5JMJ09oG4bUUIJvBPzxaaCTmRGq0zPFpcsjeI8Sj9UpQqsCBcKxFnOnRh E5VQ== X-Gm-Message-State: AOJu0Yy3qi75H61tEFQAQMx0iMGFm+tXUU0RmtIIqWgL819gz4UJPV5a agTgY1n8AEWTOEFJKXOMCEaTwg== X-Received: by 2002:a05:600c:3c96:b0:403:334:fb0d with SMTP id bg22-20020a05600c3c9600b004030334fb0dmr18654577wmb.4.1697023162835; Wed, 11 Oct 2023 04:19:22 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:9134:b302:d8b:a200]) by smtp.gmail.com with ESMTPSA id a4-20020a05600c224400b003fe2b081661sm18945715wmm.30.2023.10.11.04.19.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 04:19:22 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Palmer Dabbelt , Paul Walmsley , Rob Herring , Krzysztof Kozlowski , Albert Ou , Jonathan Corbet , Andrew Jones , Evan Green , Conor Dooley Subject: [PATCH v1 09/13] riscv: hwprobe: export Zhintntl ISA extension Date: Wed, 11 Oct 2023 13:14:34 +0200 Message-ID: <20231011111438.909552-10-cleger@rivosinc.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231011111438.909552-1-cleger@rivosinc.com> References: <20231011111438.909552-1-cleger@rivosinc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 11 Oct 2023 04:20:51 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779457923063440225 X-GMAIL-MSGID: 1779457923063440225 Export Zihintntl extension[1] through hwprobe. [1] https://drive.google.com/file/d/13_wsN8YmRfH8YWysFyTX-DjTkCnBd9hj/view Signed-off-by: Clément Léger --- Documentation/riscv/hwprobe.rst | 3 +++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_riscv.c | 1 + 3 files changed, 5 insertions(+) diff --git a/Documentation/riscv/hwprobe.rst b/Documentation/riscv/hwprobe.rst index 06f49a095f19..a577b1d72dff 100644 --- a/Documentation/riscv/hwprobe.rst +++ b/Documentation/riscv/hwprobe.rst @@ -131,6 +131,9 @@ The following keys are defined: * :c:macro:`RISCV_HWPROBE_EXT_ZFHMIN`: The Zfhmin extension version 1.0 is supported as defined in the RISC-V ISA manual. + * :c:macro:`RISCV_HWPROBE_EXT_ZIHINTNTL`: The Zihintntl extension version 1.0 + is supported as defined in the RISC-V ISA manual. + * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance information about the selected set of processors. diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index c9016abf099e..3c4aa5d01f93 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -47,6 +47,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZVKT (1 << 21) #define RISCV_HWPROBE_EXT_ZFH (1 << 22) #define RISCV_HWPROBE_EXT_ZFHMIN (1 << 23) +#define RISCV_HWPROBE_EXT_ZIHINTNTL (1 << 24) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0) diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c index da916981934b..ca17829f3e16 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -156,6 +156,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, CHECK_ISA_EXT(ZBA); CHECK_ISA_EXT(ZBB); CHECK_ISA_EXT(ZBS); + CHECK_ISA_EXT(ZIHINTNTL); if (has_vector()) { CHECK_ISA_EXT(ZVBB);