From patchwork Wed Dec 13 11:32:57 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: 13490777 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 11B25C4332F for ; Wed, 13 Dec 2023 11:33:26 +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=+2TB3KaVMBNvhWFxwTPVfRtpAIVaxtX8pfXgw7jnaeg=; b=XVLKJXGlUdpY8m KoRJj+56X+GLsNZaxihBMD4K6aw6ayG8P3TcemiLpPSTeDLunZ+q3YIs/K83slB/hIM2ZmTF/RdwA /2+nLKa93G/mxHUtMB176nI//k10oV9DJ9I1+UkfYsZbLk9zBG/DE+7/xYzgPhT7ya8tO2JuzSm8p EVHqnlYjBhIM+UFiPQcvumz22GTru8kCQby8m+zs4C1IY6zgCBoI8EU3k55w5M2wRJs9EMiMvRwTR xY0SZN0zJK+keb34o69trwk+rNjsR2UgeJA0CTdAlSPw0GpYBbWtdvj2HdD0QW89PKKbpcu4CPe3O 3L8zUuB0XdySUQa2WtFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUN-00ET3i-0Z; Wed, 13 Dec 2023 11:33:19 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUJ-00ET1V-0E for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:17 +0000 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2cc2adbcf87so5356471fa.0 for ; Wed, 13 Dec 2023 03:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467193; x=1703071993; 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=EdmTrlQiysEJ9gRiozTT9JeMo8PxECkQ3IPcbyVimLw=; b=Sg9eR0Ry6tdryrq6wlsJrkJ4KxsC1a65Fo7xLWlwKLbWl3NHTAB2tkVdt9XZv712Ql FcpHSHevkFIewkzb9xP15YTwtxSgoEKy9PSH8L7g06ir/3o7Mb1eqtlIOa5wmvPPJ6I0 itAihoMsSIvVe/HeNUYcceQ2no2v3nPEOrUO6bnYxv4Dl+X7qQxnGqEjC0QxTVR9KXUA aZi3HidGLj6g7BnL6EJXYIAkNpblJTAH0UvmOz71P+51drw81BqKMhHaMRj+HqOIPpum q9maPt0t0AW1C03cmPoYdyYKQcbtLgxpWNzN9I/LrAGrq3ECP4duuzDubda24HvEcRFt CDuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467193; x=1703071993; 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=EdmTrlQiysEJ9gRiozTT9JeMo8PxECkQ3IPcbyVimLw=; b=jgAP1zp78ZI73aWPMRj58LLt/XqPey7eJ5B1Y1bBa/twb9hGslq6cuml2WBnu1ewZl nkuguhirNmKsGT2r3S1kZfUKlfVf5sGWJOPvqWblubkeh/A6UL9Qu9fH4/f1gXjHr8ck 8ttlwiyIWaa2yb17eEMwnUsbOZIC7nSsvvmhbFJLNVK+dhY+HsW9AGCCLlM+x/e+GAQt O9XGqXMzlZJ0WRNVscHzRs0US5fNvCcD/Lse5zGPqpexsZw7jBYKm2pYcN2Aj2SW29up EWHwHgye2EQC8qgbjq02NbNYyUjihz3ISRM2lLKEbP7PJq9zHzZ+W/hk/BZxiz28UEVZ r4RQ== X-Gm-Message-State: AOJu0Yyj8FtzaXxC7L5Tx3FeNVPDbv+TGkt3XAro7PgmUFgsBdB+Ozyx vrW3lEEouiidPScxDi8ASFZVAg== X-Google-Smtp-Source: AGHT+IGRFuH629++Bb3wGMQ+qnci9mOmjy+tVmt+kXTT5YpcBLnKt70/RrbZJJli1/GOWOFaotbQYw== X-Received: by 2002:a2e:a54f:0:b0:2ca:350:9339 with SMTP id e15-20020a2ea54f000000b002ca03509339mr8364738ljn.3.1702467193265; Wed, 13 Dec 2023 03:33:13 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:12 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 1/9] riscv: add ISA extension parsing for Ztso Date: Wed, 13 Dec 2023 12:32:57 +0100 Message-ID: <20231213113308.133176-2-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033315_329048_1C0EBE7A X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. 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 support to parse the Ztso string in the riscv,isa string. The bindings already supports it but not the ISA parsing code. Signed-off-by: Clément Léger --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 2438d4685da6..3b31efe2f716 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -84,6 +84,7 @@ #define RISCV_ISA_EXT_ZVFH 69 #define RISCV_ISA_EXT_ZVFHMIN 70 #define RISCV_ISA_EXT_ZFA 71 +#define RISCV_ISA_EXT_ZTSO 72 #define RISCV_ISA_EXT_MAX 128 #define RISCV_ISA_EXT_INVALID U32_MAX diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index dc0ab3e97cd2..3eb48a0eecb3 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -279,6 +279,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zkt, RISCV_ISA_EXT_ZKT), __RISCV_ISA_EXT_DATA(zksed, RISCV_ISA_EXT_ZKSED), __RISCV_ISA_EXT_DATA(zksh, RISCV_ISA_EXT_ZKSH), + __RISCV_ISA_EXT_DATA(ztso, RISCV_ISA_EXT_ZTSO), __RISCV_ISA_EXT_SUPERSET(zvbb, RISCV_ISA_EXT_ZVBB, riscv_zvbb_exts), __RISCV_ISA_EXT_DATA(zvbc, RISCV_ISA_EXT_ZVBC), __RISCV_ISA_EXT_DATA(zvfh, RISCV_ISA_EXT_ZVFH), From patchwork Wed Dec 13 11:32:58 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: 13490778 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 D93D1C4332F for ; Wed, 13 Dec 2023 11:33:29 +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=NE1+WzsS1S30f205vmgax4nIUABj+hiQO8yCneWEllo=; b=3DQf+s52ygayGx sK+PxwthIgiRRK2W08X79R9H9qBIE83D2JqlJEjRnh24pXdfhhrNqgMBOapTwnK4TZR6uWiZzu3pi xhF7K6A7ujI2XULywaoYNje42LcO1Byg1kTAZuJR7uH7htB8QC8vN6BU8trORZ0ktUmNfOBop+/os ee0SjA2kWuWeG73A8bc+tLD9hvQyLn3w41/8MQW0OkL72ooZHaOAay3S87oUZHyq44j4fy0QuxPLE PuvZI5462TgsJnoHRkRfKMPX+9W/CHTvQbqKqF7SjMFSHrMQeUPvtzpJ6OQGXd7JsWa6/SWftSrwc eeKH7nv3J7DJJMMDbSMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUT-00ET8t-0R; Wed, 13 Dec 2023 11:33:25 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUO-00ET1m-0Z for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:21 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2c9f575d4b2so16198021fa.1 for ; Wed, 13 Dec 2023 03:33:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467194; x=1703071994; 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=fxiI83AWHviDA1K2goPpANE3T3h3Nt6zkBhZOZxUOr0=; b=c9Nv6c2VKCWSpc38hq0a1oPl/GmzxJ/B2ogWeQ9BPx15fmN6Bmz7QpfqkQruipoqCj NJMRG17sE4ds1advspVXzJiWNd2U7+0dxn1pBIyMwPRXSXZy0CHbYQ9QrGe2cQ5mpdsk ks9swBge6dcWT/xmvyqe4PBPy3i8ZRJAFQq5U4jbwnWlEqe44pbb7SiLZF1qXfaMK6g5 E71bG+Kw4ADQaZdiPWlXVna49paY0q3pODukVwndjPsPCJSgRu7HWiew78NkWUGmDdX0 AeV9l2ZUzZME+Ia5gYzPB2wDn7sjvTEcPvKOpuJcOdF78gA8fv7/6OjjyVIiL89q0C9B 94PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467194; x=1703071994; 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=fxiI83AWHviDA1K2goPpANE3T3h3Nt6zkBhZOZxUOr0=; b=VOGVD9yWbKf1nUixyoAraU8U1yvL/VCTLh7X3sua/cFZY4yJLjwwjOz4V3vOw+Nvgd QXa83fgYA91hFOtrDyBzUhT2jcfSgaQGuluVNYobABtI7bAOAfcbV+SpF+k7DNphGWld +Jv1XOUZrbytMY78//zInPNv3/u3unLnhJIlGiXuAt59d5J4fe0bsUo0uKaxK06WQ2vB TN21Ba5CoOjeA4sPrELa3dLZ4OeV9HH4Pg60rRqRjaQUifCBl3EUSYFQKncjAZ6cgjzh fSRMUxiDGwbA/AH4/qqWMDrL/EYtvBBWSjGYsr77WxjzPljuJ1TB2ITWkfRy4tak8/Be fwUA== X-Gm-Message-State: AOJu0Yw5tl7Me45U7QkcOsddOO9PbVhcoZ4YRbO44WXrGzvkQTTEUDRU ekRl/Q6F8Q+BGKdeqF80OVkPYA== X-Google-Smtp-Source: AGHT+IGFQ9eQ0IrP8TYC+dSFSgqEE4ePc+Ww0dv4Sk8Ab3H2/aQW5oT0kIoa/QE1H0U8J0J6zKys2w== X-Received: by 2002:a2e:bc23:0:b0:2c9:edfa:f7a0 with SMTP id b35-20020a2ebc23000000b002c9edfaf7a0mr8605317ljf.1.1702467194165; Wed, 13 Dec 2023 03:33:14 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:13 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 2/9] riscv: hwprobe: export Ztso ISA extension Date: Wed, 13 Dec 2023 12:32:58 +0100 Message-ID: <20231213113308.133176-3-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033320_221776_A8911DDE X-CRM114-Status: GOOD ( 10.50 ) 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 Export the Ztso extension to userspace. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 4 ++++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_riscv.c | 1 + 3 files changed, 6 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 41463b932268..10bd7b170118 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -161,6 +161,10 @@ The following keys are defined: defined in the RISC-V ISA manual starting from commit 056b6ff467c7 ("Zfa is ratified"). + * :c:macro:`RISCV_HWPROBE_EXT_ZTSO`: The Ztso extension is supported as + defined in the RISC-V ISA manual starting from commit 5618fb5a216b + ("Ztso is now ratified.") + * :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 91fbe1a7f2e2..01ac3dc196e5 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -56,6 +56,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZVFH (1 << 30) #define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31) #define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) +#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) #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 f0bd7b480b7f..6564fa9e7a7f 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -174,6 +174,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZKSH); EXT_KEY(ZKT); EXT_KEY(ZIHINTNTL); + EXT_KEY(ZTSO); if (has_vector()) { EXT_KEY(ZVBB); From patchwork Wed Dec 13 11:32:59 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: 13490779 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 33D13C4167D for ; Wed, 13 Dec 2023 11:33:31 +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=ouNKVyGzYCqMO9ZmRq5sN2s4FvlhTqmV6aCzYzKFA5g=; b=22M+DIDb3D2y9c VRkbam3yN3J541SOiIUpKWFTtIaVWTO1RT3s6FTiMhByxaf0W91MbNDM23AIVT3TR91gM+Ni/9a9v apbfjsCRoGP9B+FFze+qdSIgXHV6ILqeeZUzOS/oz7gN3zuLAxufYu9LsYRug1YEZ1UJ9hFMK/7jj WHZWbkqtlet/cgekZxr52NJ55SBlWYxigZhiySGeKX9OdgqZgJ/ngodwo9zJILgoZYwvgTn97uY/8 GdjDSbRCT7SjAqwtJYvV7SDI0OqR34ztAPKoLmo2ohcUeseacVBlblmNxNvX+wIbzFSnJ9HmW7Oln U5D0EMtbla+ZAzziayNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUU-00ET9i-1K; Wed, 13 Dec 2023 11:33:26 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUP-00ET2M-0U for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:22 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40c2d50c0adso12676075e9.1 for ; Wed, 13 Dec 2023 03:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467196; x=1703071996; 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=bstEpC4Wn7eojNR4ey8qLYKe/MWWQca3CdSgitFw4Fg=; b=V2s8ZDn+ZohUFotCRi0acdAAnFj0pVLSiOpTGcUIQ66orpDfb+W34iqJFkuqhDnzFD sWIGxq2p+/fA+YEkQkCuiVIkMJCILcXeUtStgITreYRroTSoQht80wFWb+P4XmyunIrC coYh2NmhK81yn7bG4ADivmnSzBB+ONQm3mqqEEoveQpoUyAlKdanGN0eCaYzVIR+ik8Z Ijqp8Ntoz3dVPSrpPvqPkvQuR963yak0XdM4/bu8YCbArokFCRdFAIjdQv4zPUVW5/Cj iadSny9tVG2+lYpPAPwUr43NtcathMUKbVgqs2nBV2x45O5v8SE5USUDLp+rjv8bmGgO 8vnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467196; x=1703071996; 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=bstEpC4Wn7eojNR4ey8qLYKe/MWWQca3CdSgitFw4Fg=; b=Jo7jFW5mm030awcZ/bXNa0DMGq/zJzkpeb1GLvk4OOSo6Ve0ftk9804Dd79Qyi2E2o I2CMAlip2M10QKXQbLuLYT700TIzeVDCiHI5Ig6nFvRs975LQR2QOPP0bMIdspXdw5oC glgsJcOpl+J4ZEBb/vgrLRbMdc4EZS4t8fmTOenqhLmCxor5l49SiHlYkrxYEvzT5yPH +kPh1Aacb/ia1sLjFDDuiXs4h5EoI4b+OecTPfRaEDodbTzFdoa+vxbe1lQNYurBKJuW VnOu/QOfm5e8wgSegbZ+wMRU8R0utlXYUw3i/IStmxp8n/oCV8BjjXD1Z14xVnn9VXvs X+Ug== X-Gm-Message-State: AOJu0YzICxYWmrCcnv7TROpOc9BNc+2bxh5cWwqojy6D2Qkv1Mr7BanX RTi4X8AG9igvdpytxlTIt20ifg== X-Google-Smtp-Source: AGHT+IG2tOfMAS1pydsf4pPawIp50fPoX384Fx9efJpcAm8MmIokurwGuZwz8GEsZl7/fbAwTEX3Lg== X-Received: by 2002:a05:600c:358c:b0:40b:5547:76a0 with SMTP id p12-20020a05600c358c00b0040b554776a0mr9797289wmq.0.1702467195152; Wed, 13 Dec 2023 03:33:15 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:14 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 3/9] dt-bindings: riscv: add Zam ISA extension description Date: Wed, 13 Dec 2023 12:32:59 +0100 Message-ID: <20231213113308.133176-4-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033321_192721_23537D9F X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. 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 the Zam ISA extension. Signed-off-by: Clément Léger --- Documentation/devicetree/bindings/riscv/extensions.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml index 3574a0b70be4..912cc6a42eb4 100644 --- a/Documentation/devicetree/bindings/riscv/extensions.yaml +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml @@ -171,6 +171,11 @@ properties: memory types as ratified in the 20191213 version of the privileged ISA specification. + - const: zam + description: | + The standard Zam extension for misaligned atomics is supported as + ratified in version 20191213 of the riscv-isa-manual. + - const: zba description: | The standard Zba bit-manipulation extension for address generation From patchwork Wed Dec 13 11:33:00 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: 13490781 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 07093C3DA6E for ; Wed, 13 Dec 2023 11:33:32 +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=zDul2L1/Xwe5Z7JpNGTox8/yOyvUiSGV7/0HztQnAdw=; b=B5VDFZdYKg105m djhUOEF6Yh6qv4KOl5n+K9p/Wl+rjvm00BHQ5z5U4Kg1W57FPVk7caTKuseceTn/BSKlhJt2VOqq2 iMFRKSgnx5q8Ib2qpzr9PcxrBmtEZtH/5pF3uN221kSjz3Jgvil1rL+SSfU22kbkI7ApOqWtZgn4C IvEqIeGB0m4lb4R1XbTWXRgcbNcb9vWV939nrY36FrUMv+5bx+uqsGB0M1bAfawc7hoGaTI23rpLX R2QdEjt00WmGNxdlMxaAWw0BYWTl7yXdnXMDX4znpF9ShUVKVf2iQejl5kj92l4LPgc0xGeOp8E68 PJexRuTxQKKm2r9hKozg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUV-00ETAM-0G; Wed, 13 Dec 2023 11:33:27 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUQ-00ET2j-11 for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:23 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40c192f488cso11230925e9.1 for ; Wed, 13 Dec 2023 03:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467197; x=1703071997; 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=zJ7qFvLPI16XitLVU7jac70czdbEyCJmCnGlh/kcFn4=; b=qZzu1r1gQx92nSzWDWTlaXFyd0FNHjgUWGZXm3gptEwVKJTY/B9m9V0lDmthOSiFnM 3IPC/kYsNhFRaCUIS2gmWb94Hnc4w7kDYvwbF5ZIhH1hk4AGs4AyLBqRU9WyDVzQ8hQT MVueyOZleQlLkAyBZN3MyIFiW666U7UucfBfVGRVaFnSbx6myuRv+ts8DO9rTuPUzpOG CQ2XAAcdIqi+uq1JTL02RUOpKtasUT+8f51SZaWaIN65IMib2hey1YzznX5/eLoGz0wm 1tS2bQHYmLISTxHZPl5ayYhfA18/oXNaXsgMSkl97Gm8Yon8AezsH5HAL4hWpS0mboHO 7CrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467197; x=1703071997; 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=zJ7qFvLPI16XitLVU7jac70czdbEyCJmCnGlh/kcFn4=; b=TRAYtv6E4ZiFnnh6I3/dOVFfz5wI+sBdTe7FhsDNRqwSqaYgVU/ODf/HQsyIE/XWLy ZAjVf2J+hXAkIc/qIQtCrqkpO1fjJl4EWgHEWtCijVm1+NufDn7pWH+iPQZrnNHrakUp zBsjpOVZZIaAZCHOJcPhLThaGsJgNKnCk7D15TONBl3QPKuIhdeoKGEUIastQ5Ivo4x9 iHxkxMjhs3pYb3luPBs+2yczSCOHna0G/zLx9YFwgsTKSavBIu2CytVukPujXR6Z+P21 FQuE1rQ7yCJJNl8TBfPS1f+OfsEmAWe2xGu9e5Zxl+R8MlZL/xwkqx3DiwmuUskvXKyz 4vfw== X-Gm-Message-State: AOJu0YxHLuqQmRfQrpSzcQJmccGUoB9/FDWomflX5RfRAdBZwGXryB6Q TdasNL2oGcYKuZPOo61XhvZYVg== X-Google-Smtp-Source: AGHT+IFSZAznHPSK5PUles9w0ak3hYXLoPc4Qu5KPjMvXQBkR/ftanO0CSh3prHsJkQveJSFnBCRzQ== X-Received: by 2002:a05:600c:1d9b:b0:40c:2960:9603 with SMTP id p27-20020a05600c1d9b00b0040c29609603mr9614366wms.3.1702467197077; Wed, 13 Dec 2023 03:33:17 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:16 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 4/9] riscv: add ISA extension parsing for Zam Date: Wed, 13 Dec 2023 12:33:00 +0100 Message-ID: <20231213113308.133176-5-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033322_358354_9BCEB675 X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. 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 parsing for Zam ISA extension which is part of the riscv-isa manual but was not added to ISA parsing up to now. Signed-off-by: Clément Léger --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 3b31efe2f716..016faa08c8ba 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -85,6 +85,7 @@ #define RISCV_ISA_EXT_ZVFHMIN 70 #define RISCV_ISA_EXT_ZFA 71 #define RISCV_ISA_EXT_ZTSO 72 +#define RISCV_ISA_EXT_ZAM 73 #define RISCV_ISA_EXT_MAX 128 #define RISCV_ISA_EXT_INVALID U32_MAX diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 3eb48a0eecb3..e999320398b7 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -259,6 +259,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zihintntl, RISCV_ISA_EXT_ZIHINTNTL), __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE), __RISCV_ISA_EXT_DATA(zihpm, RISCV_ISA_EXT_ZIHPM), + __RISCV_ISA_EXT_DATA(zam, RISCV_ISA_EXT_ZAM), __RISCV_ISA_EXT_DATA(zfa, RISCV_ISA_EXT_ZFA), __RISCV_ISA_EXT_DATA(zfh, RISCV_ISA_EXT_ZFH), __RISCV_ISA_EXT_DATA(zfhmin, RISCV_ISA_EXT_ZFHMIN), From patchwork Wed Dec 13 11:33:01 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: 13490784 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 73379C3DA7A for ; Wed, 13 Dec 2023 11:33:33 +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=2BpczHF92VmXZO7mOAgFB1CrKZulKm/ghrFlYZ4Dd4Y=; b=bkqmQTUhk85HUv htow8GNR0kRo2v/k/6av3SOPsmnPDlRVRH5C54mt9m2goY1Sp7zcFN5jnJURugljB8YSgBtPe9T5r FJIr/WWcLvgZNvn4adwN9LMeXtRtDxTDj0eq42zr17jgcsIsGMBLNJwRpZa2IHDApdyKO8Oqd8/MW 0k3ClEHhrv4FYRKjkh11oCK9/V0SywO30ZAYfQCaaFGnQB7YkhhEMVlHYOX4NbjrhRl73XJbumwWG Fkw33O8clPTDXcUTf+JM2F44l5EPdpVn1rHGQKfuxnlfnHVlNawx4m0iWqwRN2MAS1plZYxNDnXxr lrxvncMi8FgxasyqGv1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUX-00ETBq-0F; Wed, 13 Dec 2023 11:33:29 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUQ-00ET37-1d for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:24 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40c1e8458b9so11300285e9.0 for ; Wed, 13 Dec 2023 03:33:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467198; x=1703071998; 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=N3Huv5MEBJaGZczqd/5TE8MmVw2Iifvm3SE9MHyvArM=; b=ARNgD2H3kgd3ToP8iInjkwZsmoIpA2G0EYEvODkuMcj9NOU78xRoQ36m5Zwlo6HrgU oa/eReVm1rp49P7LiJ0MkGueaWKplTmraxKQDhvzlFI5cfXrAhTRMCe8JfRmc1ByvNgc f9+lK3WcJlWrTr+Cm6qZeRKWV2RvsE447U63gt4GLZKPbA0K7135b+/iZyW2juOrEq0a Pu1qRod+JqZtt8WTPBXPlmAmH+1bMfXZcMkr3C1SwVb9RWLrBhr2cav/7oq+RoHItxZJ a8EwixeCpwTrXKnsM9omlCVSAa//yannuX/tjvzGE0ASbdGPI5hOY0EtDjtfAgtPh0yB OEKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467198; x=1703071998; 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=N3Huv5MEBJaGZczqd/5TE8MmVw2Iifvm3SE9MHyvArM=; b=eaPpf7N+6B6UaoAtNCM26WsQiUydU1Mo/0uzdNEWE5q+ZXAg4491kdhl+OemV9SyE9 H6yv5F2lsV/su8XY+3vvIhko52qgszqyeOPyZKH5gnVRPTFDw/B1nwgHc4tu/P1b3qGb FBDNcfXjSGv7FpA2DhgxtTdzsAxKMi70yzIs92ZYSxk+bf17jb76K+2FGMoHYLPJ8CgO LkKiUek4V3vwVZhnXJc8UnXUvhlD1CXnpoG4dQRjQY07q1K+3S99IcjJjCCAj8jUDj06 rbJ4IBTP6IzOM8gC+GHlY15ZJzViQui/+KWjj+UAbLPxGZOMVF/qOekU4Een1royIjYY c7Og== X-Gm-Message-State: AOJu0Yyvva35bhq4PhBEDo8/DwEKaYXIaXFzGHDSBZGalZad48b6ty2u kQfGXATcCXuJdrUBGdNPu4Lp9g== X-Google-Smtp-Source: AGHT+IEuw1QBTiAznUoQrReEOynJMkbQ+ARylSUzX7QvBk7zRYceQKbxX1KCoyBCOFTm72L9SeyM/g== X-Received: by 2002:a7b:c411:0:b0:40b:4f49:4a33 with SMTP id k17-20020a7bc411000000b0040b4f494a33mr9613789wmi.4.1702467197998; Wed, 13 Dec 2023 03:33:17 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:17 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 5/9] riscv: hwprobe: export Zam ISA extension Date: Wed, 13 Dec 2023 12:33:01 +0100 Message-ID: <20231213113308.133176-6-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033322_593416_4BF1640B X-CRM114-Status: GOOD ( 10.62 ) 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 Export Zam ISA extension through hwprobe. Signed-off-by: Clément Léger --- Documentation/arch/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/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 10bd7b170118..9b19ca3433de 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -165,6 +165,9 @@ The following keys are defined: defined in the RISC-V ISA manual starting from commit 5618fb5a216b ("Ztso is now ratified.") + * :c:macro:`RISCV_HWPROBE_EXT_ZAM`: The Zam extension v0.1 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 01ac3dc196e5..2350c45741a6 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -57,6 +57,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZVFHMIN (1 << 31) #define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) #define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) +#define RISCV_HWPROBE_EXT_ZAM (1ULL << 34) #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 6564fa9e7a7f..a8473d7f9d1e 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -175,6 +175,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZKT); EXT_KEY(ZIHINTNTL); EXT_KEY(ZTSO); + EXT_KEY(ZAM); if (has_vector()) { EXT_KEY(ZVBB); From patchwork Wed Dec 13 11:33:02 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: 13490780 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 A3540C4167B for ; Wed, 13 Dec 2023 11:33:32 +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=lklKtXjkWrUzdWCa5tq4q6/lv1UeV0FEkynTuizJNUY=; b=JUi9aaAExbrlIc OOe0om0fHLesmpznyJbLpvi3owoVhv7GCICoFltGNFeeIZVUSBoQTFxWOaVB9ueHv8ZYJZdNYFYzr mNmwqznUY/oB7ElKZW3muUZFsgs86xr8zshc08mpxUU/LCVgCf7UuI6G/htszdGrkP7BGqp8eMy5a jzZRFDFwl5LQFsakrNLdJ67y0luD5lmy/+WUBMPUStkuSqwv4DY5gi05i0wUIh/2rb8sn4CSDaxGY r0k4yL+AIKzq9g1wycm4xPdImiBIhF17sgxF4WkyQRsxnbIJRQDKkx3Dho5nzPCw09Q3qKb/BrpnW lwDA20dryK8BgZB9xclg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUV-00ETAu-2V; Wed, 13 Dec 2023 11:33:27 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUQ-00ET3y-11 for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:24 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c9f575d4b2so16198131fa.1 for ; Wed, 13 Dec 2023 03:33:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467199; x=1703071999; 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=nWX/zjp+iAoc0sTO0EE360u/fHh1vFE2puPVRvnlJSg=; b=Eo7tsbnyG8cwqx9hA4uDQ+RwMBwrcWe8O/jyiSkYmzRuNRU/C4MakAhd9CsoE0A0Wl fDQsVugh8i6zBuLWUscsmno19wKnFwAVkJLHdrJ1nBhOkLWTlXXQjw7zuI2Zmc8g9YPd 4rwLEOd8AHQ5A2YkHiwa3ttRfAnABeRiIyh9RGr5F/F729+I1iwzR4u1lWfXnY/C2dh5 TZ/EWmdxfeVc0EeUu4TZHXLt+3vSQXq2B6Jrdk+ctxEVFnF/Lo8GR93KRi6RKPNBs4xo PLzX6GkkgCydPqm+PWtfW3xnOQ5hxHflXQUj9peJVm6DQQs7bG2qUXe4TceyvTlQ8Ptu dlEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467199; x=1703071999; 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=nWX/zjp+iAoc0sTO0EE360u/fHh1vFE2puPVRvnlJSg=; b=Y3sB+hqwTHPrV0URs75v8Sv2mGFsKIKrvpX4q+ieAj2tTCuVjQPQCcas4JhOgfoGGs xHSwj+eyQ6Y/gXNIaAlk36NNmuoZvhtNmL0XUAfdAxSxdZbevkHaWHOfErM6HIcaQVmt 0f+SfiykcbGpUD1F7Oj7GzENej+taQK2RJ7K+PCgpEBQz/MtJ2uCfjRyLHnCgnjN5hUi h1LrB0Y+KTQZnPhs3jOf9jCWF4pmIDnJijBHapJzZ8euGq6SGiQGtuQjOdlqmB4h+fPv 3PvnTRlK+4G2FhPyB8uj9XZKiYQqPaaMty45k0cpUMVejzR+cn4LNmfUgxbscbYHkd4M LhNg== X-Gm-Message-State: AOJu0YwfxUAZB/SAEPCxAQ0/8KtomfnEOscIsOG8apugurfS1xVUjOc4 lTgsXRgncuxGY+DvNaBOCZcCrw== X-Google-Smtp-Source: AGHT+IEuXYkwYCdXUnQRj5u26PSyylqZ1NgdfvKlwWU8/MoItLq0cyd9mcOkAanUk5MDzRp5gaQUuA== X-Received: by 2002:a2e:918b:0:b0:2cb:2d8a:a28a with SMTP id f11-20020a2e918b000000b002cb2d8aa28amr5882241ljg.5.1702467199112; Wed, 13 Dec 2023 03:33:19 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:18 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 6/9] dt-bindings: riscv: add Zacas ISA extension description Date: Wed, 13 Dec 2023 12:33:02 +0100 Message-ID: <20231213113308.133176-7-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033322_383093_0F5ABCFB X-CRM114-Status: UNSURE ( 8.46 ) X-CRM114-Notice: Please train this message. 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 the Zacas ISA extension which was ratified recently. Signed-off-by: Clément Léger Acked-by: Conor Dooley --- Documentation/devicetree/bindings/riscv/extensions.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml index 912cc6a42eb4..264114fa943e 100644 --- a/Documentation/devicetree/bindings/riscv/extensions.yaml +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml @@ -171,6 +171,12 @@ properties: memory types as ratified in the 20191213 version of the privileged ISA specification. + - const: zacas + description: | + The Zacas extension for Atomic Compare-and-Swap (CAS) instructions + is supported as ratified at commit 5059e0ca641c ("update to + ratified") of the riscv-zacas. + - const: zam description: | The standard Zam extension for misaligned atomics is supported as From patchwork Wed Dec 13 11:33:03 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: 13490785 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 44DE7C4332F for ; Wed, 13 Dec 2023 11:33:34 +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=KW8LJa6na11HAfnNkhQotcvZQ+KmdOMaaCOAL/2Sfuc=; b=GBsToEZorfGi4r Gozjqv0PzjZa34ZRcIaHAALWVlG7vqJt2IktUOJJ5Ith289oI6sIRWCUBVKDqcbUdLOi40pb1G/Km lNrNs0XjKw0n16fKUfV6u6filPA430PBqPU2XMOTPaFiaJ7xclqclEUC38SCe5D0CGxWKsa02Ao4E 4eDSfwxzIaJXTzciT/lBKXAhjUvYbFUC40V2/TowVvpGY7Y0B0uhHjJBVx5h6O9C/RskUc7iEQGZ2 Ls0DTpdLqMnCtiXO8mimM1SOJIWiKkBXQXr2+UG2MHNzcYJn9//cB3ZCnKmWHaugx121XZmbCENY8 k+PRCaHDMxT/U5P36kpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUX-00ETCQ-2O; Wed, 13 Dec 2023 11:33:29 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUQ-00ET4x-12 for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:24 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40c495ab68cso5701985e9.0 for ; Wed, 13 Dec 2023 03:33:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467200; x=1703072000; 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=NSyk12PGgNh6ZiEbOULW7RPQKbPPPMGsxhdUj3Rl3fw=; b=Oav1Nqiafy6gtc1DNb5MZe6fvlo4ZJcruFAB2A59LRCbKvdOTF7aCEO6pDfipRNpyz 2WmHmECkeFOAmFfn3Xf6Sf1K0N8oXwXK+3pRPnhcLBkKox4E+4xpBZ8+gND645BjdmqZ IOtKVh+uL05WOH0JFpfnG8eQDKGyPZLHk2k1iUfiYe3Q68xI33YHTnfGyoDTveo7SqFf dcl7v0xG69/j0JZB34MPz+YW2vSIm5xcTshbfXf2/4LCziETFfNnqD3GjFgIZfuyUIHK e81DrIreJOzVRhdPcLwWhxitr4DXD1cHXylmhFFyALGtImsisOpoEk24N0Q3PAepO58k PgYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467200; x=1703072000; 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=NSyk12PGgNh6ZiEbOULW7RPQKbPPPMGsxhdUj3Rl3fw=; b=rXE5HlsRLyc1J+pqLm9duc25a0mzxppVo5NevuLc/kbstmEp6p/Vk8S7zbq+FL2et9 LqgsFuqLMe35pnJV/7zNAp9OAvBioULvAstU1d1E5rE7lDLca+uxggvoHhsNMTjdp1RX kjF52iYh/8nRsbboNXVZd0Xq46A/BKriGpDBnrZdXJIICOX/dyzqApuhn2s7eIVLPL8d iRwlXrNVjqpbPtj19XMrq4mBTrQfgBUuL5ndDd2wHbaNUpWyEfJv+82CcZU0kLK31hab blO1d+xsuYXAk8/nojXDyiyTVheqwqTo/PGirki03FmkmhEaKLm7SXtAFsr8/LT3uQg8 0nOw== X-Gm-Message-State: AOJu0Ywsf/TVGMIRSawV8pZMODIxxTTUOKydRTLMNmXfGA0wcrmNyND7 RbQR28uJF5HuChzKqw17ahLSxg== X-Google-Smtp-Source: AGHT+IGpaCx+D5ojXDBVQxpZqQUYiYfjlRdA9ehLOCWbM5XAh+lwFxnI5yxd/Hyl3z3Rfp/Vdi/pXA== X-Received: by 2002:a05:600c:3b23:b0:40c:2631:7c3d with SMTP id m35-20020a05600c3b2300b0040c26317c3dmr9593738wms.2.1702467199960; Wed, 13 Dec 2023 03:33:19 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:19 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 7/9] riscv: add ISA extension parsing for Zacas Date: Wed, 13 Dec 2023 12:33:03 +0100 Message-ID: <20231213113308.133176-8-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033322_413984_B392FFA6 X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. 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 parsing for Zacas ISA extension which was ratified recently in the riscv-zacas manual. Signed-off-by: Clément Léger --- arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 016faa08c8ba..8aee032f092f 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -86,6 +86,7 @@ #define RISCV_ISA_EXT_ZFA 71 #define RISCV_ISA_EXT_ZTSO 72 #define RISCV_ISA_EXT_ZAM 73 +#define RISCV_ISA_EXT_ZACAS 74 #define RISCV_ISA_EXT_MAX 128 #define RISCV_ISA_EXT_INVALID U32_MAX diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index e999320398b7..62443cd632b8 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -259,6 +259,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zihintntl, RISCV_ISA_EXT_ZIHINTNTL), __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE), __RISCV_ISA_EXT_DATA(zihpm, RISCV_ISA_EXT_ZIHPM), + __RISCV_ISA_EXT_DATA(zacas, RISCV_ISA_EXT_ZACAS), __RISCV_ISA_EXT_DATA(zam, RISCV_ISA_EXT_ZAM), __RISCV_ISA_EXT_DATA(zfa, RISCV_ISA_EXT_ZFA), __RISCV_ISA_EXT_DATA(zfh, RISCV_ISA_EXT_ZFH), From patchwork Wed Dec 13 11:33:04 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: 13490783 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 2747BC4167D for ; Wed, 13 Dec 2023 11:33:33 +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=jbd3ApkJUcLoS+dL4PjzxHF3AxKjRu2C0E1KsLOP31U=; b=rlNFBvA5bVraVx g6+wu41/9l7uMBpAmwvEWRWBTdWXOd6HrrBA96fzwAghajJMfYh+8J/Fcy0cMnd5jIuW/p0kSN1q6 0K5DBTGX3oysO9hPR3+9c4mmKl99zPEU0//r1bm1wvxbbrVt0c+v/YiSr3skSFmdyPFc7842IYpZm 78h1cNwcfg8SG27cRLCYyiNLKl1J7so7M6DIF/AYtjekyafFN6hHU/mmdMUHjT32DMGy5HU/UvVYT DxBVniimOWFCnAyRS1paLfm8Kwt+pXv08ybnB1QKrfGTfD9VfTp1AVm2bzteLYdVWsqCEuObpqoZO J2cw4EK1k8J7ACTPyXdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUW-00ETBO-1N; Wed, 13 Dec 2023 11:33:28 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUQ-00ET5w-1j for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:24 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40c192f488cso11231135e9.1 for ; Wed, 13 Dec 2023 03:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467201; x=1703072001; 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=OT3PabJ+SN8OyyxUlhRHLBK2j0fBOpZosf39djft3/Y=; b=N8Vo23KCZDSntkDv7eaN0bEDEl70axMCiFWXLM/XJpjo5sGw27FJop6c0DOVVG4gu9 VJb3YOcjx1ahDdx4Bo/7sUQlHMaLexMvMWe7DvauHS8jYcmBlyXzoHXNu0dGs0s6EshK ucuwqfaz9ulBJfVjcdo5w4sABw8F2hWxIo7nlr3azQ9sscZ/oCU/MvqxtAy5C4+N0QyZ N/pt4zFry2nPSE1Mt0jRPM4k8f+pkoYMsw5FrTrtXrCC8dGoQI9oS9MXGC1SlraUIppq shBfJ1n+gZEZ9/U12i3qwW1F2LcA4z+C356uM7WgQRfm9SYbyFqL+cS4YaK/Y7JQ7w9z t2eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467201; x=1703072001; 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=OT3PabJ+SN8OyyxUlhRHLBK2j0fBOpZosf39djft3/Y=; b=a7ER7MIwxxzZpeYEVJDlm+Q/LbNDAiBfnbfQA9Qmg3g4DnXMLslUqwTbDjB5xXlBVw AeMB0BfJ6sQoUFndLjr8hC35vEnYdZnI+gNKcFXwXH+U5VSY2SxaMdvJW8Aiu4vgs0GJ CbhmOVP/UbcVG32nnChDlyeGosT9E4F4WBe9RjMvfnUKIRlDHFuOniRvmmSEDWdkB+ao DeD1n2xE9qZXrTsfsu5G0/3qXlijz9fkfrM8I/i3wpSvQC0x0euCHhzs0pv0YdSxC5HS 75MNM7GTFLPvfPTJ7ZGIsgsMT7oKgLNV0ThdH0BKxIijpoZob7MnBfFxwV+Ja+p6NKvS 3JnA== X-Gm-Message-State: AOJu0Yw1TRH4yQU4OlTiI1TNKeFuZTlpTlJqnkE136GVcfpHwVnrh43C uTjFSbC6vK3SzxHOYlkXmNpaJA== X-Google-Smtp-Source: AGHT+IH9GmoMwESHe8vAwJ7aLTEGq8Q2sisRnckD+tr/gJXlhQQcanfZ3+mQWdFY8OH3kjBBZTEQBA== X-Received: by 2002:a05:600c:35d6:b0:40c:b81:c640 with SMTP id r22-20020a05600c35d600b0040c0b81c640mr9664241wmq.0.1702467200958; Wed, 13 Dec 2023 03:33:20 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:20 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 8/9] riscv: hwprobe: export Zacas ISA extension Date: Wed, 13 Dec 2023 12:33:04 +0100 Message-ID: <20231213113308.133176-9-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033322_603903_78CC2E94 X-CRM114-Status: GOOD ( 10.34 ) 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 Export Zacas ISA extension through hwprobe. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 4 ++++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_riscv.c | 1 + 3 files changed, 6 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 9b19ca3433de..510e49878834 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -168,6 +168,10 @@ The following keys are defined: * :c:macro:`RISCV_HWPROBE_EXT_ZAM`: The Zam extension v0.1 is supported as defined in the RISC-V ISA manual. + * :c:macro:`RISCV_HWPROBE_EXT_ZACAS`: The Zacas extension is supported as + defined in the Atomic Compare-and-Swap (CAS) instructions manual starting + from commit 5059e0ca641c ("update to ratified"). + * :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 2350c45741a6..7ec4331122e7 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -58,6 +58,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZFA (1ULL << 32) #define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) #define RISCV_HWPROBE_EXT_ZAM (1ULL << 34) +#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 35) #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 a8473d7f9d1e..abb0eea3ee08 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -176,6 +176,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZIHINTNTL); EXT_KEY(ZTSO); EXT_KEY(ZAM); + EXT_KEY(ZACAS); if (has_vector()) { EXT_KEY(ZVBB); From patchwork Wed Dec 13 11:33:05 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: 13490786 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 DE2AFC4167B for ; Wed, 13 Dec 2023 11:33:34 +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=HFUdyYLDT9BJQeSgTBSzxs0ifh8vvh2n5fOH4aw89Tk=; b=fKz9gV6W4X42NT YcP8AZgP6Yhncsg0nZz3FH+NyuwKs13y/erZbpFhExunagu82FdIB0w5y6Kt/sDEv7FjfKNEPE0Kd pSs5lktF13MxeIjMOLHycJIFZZW/xjmsXhK5kqEcl6rCK1SgvsQ4FBCLkPjpkOcTbDbC2WHpK2r7c +LuKV/0NKo7QPG4LjGTgrwm09+wXS3pPtK2HudHQq8ZzeMggMaxIKSRQ1slBRip3mexbi6GLfPjqf xsOO14b3OW3fDfz3vTH3lAhsh0W7yf/Nd1FGLMy4dhu+XZItdiYDrHg/wNIwIdDyl2h4dRzREQI9T I3V1t9tGLR9s3fwu44fQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUY-00ETDJ-1d; Wed, 13 Dec 2023 11:33:30 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDNUR-00ET6J-0F for linux-riscv@lists.infradead.org; Wed, 13 Dec 2023 11:33:25 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40c495ab68cso5702055e9.0 for ; Wed, 13 Dec 2023 03:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1702467202; x=1703072002; 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=KKPObWVuIFXSRwOfIm7U25jwf++f1sQGlTYA9JTEt2I=; b=t/+2ggXaZKSpwgQtXCuM19+rZZDXttGdPUwlRwarN4R5amsC5EceqmSgwwIb/kz9Sj LtAssTvPxQyfR3QGPnUBmAUcPA7Fv8PNXoqj9C387tizs2ydHSA4k9WK+mgkc38L8bdU 60KlD/3b19I/6EM5XgjdRSFcbfftBE+7XdjVPQJB+964hNYHuricGv+0o1hT5WpKigk5 6o5in9taEq98HEyPkSroL0nukDFFcJSiyAkskqoPqELmKbufwpqGZAr9lzjEPkKEetbz 5ZeFpghs4JTJNsbQYBMSrFKk+pbJ5VXHTfxkZQjJEJzodEeJy3ErxSxmYkPOluvWzW2Q Px5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702467202; x=1703072002; 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=KKPObWVuIFXSRwOfIm7U25jwf++f1sQGlTYA9JTEt2I=; b=nVwGw2WvmX6lm2ZRs5mCwWmxxE/vKCZnShUOOroyExmnXTgE66IjMeGI29c/T7GKdT bAlzZ2Jq1YO3tstpLHMCY+nbbH9n0q8luHP66P5us2Z5jHdJV2pVjMfEm0s6lsifP14v WM7reUtCEZQcLIBFBJMn1NwaPckoD4Y9wK/c9+PA5jhHyREMHm6cPFITIlOfiwsWYMGP 3s/BGm6xfNib1X5JYKq9Ie85fqFzEUk/MCCyXlJFMwDt+6iyIEUX8yVy4Hl8fUAn5JBB fF4F/GkocZeFeLD1fMG5Nub5FPT4XU207/BdHGZ+nvT2fXIry7oDW6bLRZcYbc0cQhuY QeeQ== X-Gm-Message-State: AOJu0YxW8fnDakIO0YzckUZIxV3tIdJai5ytnq78B16/kI4SULIqtDYa +UqtY8V/LpdNvTn68ZxPIbxMGw== X-Google-Smtp-Source: AGHT+IFOAi6+jGGEZI3vEUxmpFwncaq2mLgc0WthEtql1NhoQKa77IbEBEbBVUbFXF2l0uTI44prGg== X-Received: by 2002:a05:600c:3b23:b0:40c:2631:7c3d with SMTP id m35-20020a05600c3b2300b0040c26317c3dmr9593791wms.2.1702467201829; Wed, 13 Dec 2023 03:33:21 -0800 (PST) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:c564:f167:d072:5672]) by smtp.gmail.com with ESMTPSA id m27-20020a05600c3b1b00b0040b38292253sm22433137wms.30.2023.12.13.03.33.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:33:21 -0800 (PST) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Robbin Ehn Subject: [PATCH 9/9] riscv: hwprobe: export Zicond extension Date: Wed, 13 Dec 2023 12:33:05 +0100 Message-ID: <20231213113308.133176-10-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231213113308.133176-1-cleger@rivosinc.com> References: <20231213113308.133176-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_033323_129096_8E842BC5 X-CRM114-Status: GOOD ( 10.53 ) 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 Export the zicond extension to userspace using hwprobe. Signed-off-by: Clément Léger --- Documentation/arch/riscv/hwprobe.rst | 5 +++++ arch/riscv/include/uapi/asm/hwprobe.h | 1 + arch/riscv/kernel/sys_riscv.c | 1 + 3 files changed, 7 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 510e49878834..a42c3b5d6bc3 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -172,6 +172,11 @@ The following keys are defined: defined in the Atomic Compare-and-Swap (CAS) instructions manual starting from commit 5059e0ca641c ("update to ratified"). + * :c:macro:`RISCV_HWPROBE_EXT_ZICOND`: The Zicond extension is supported as + defined in the RISC-V Integer Conditional (Zicond) operations extension + manual starting from commit 95cf1f9 ("Add changes requested by Ved + during signoff") + * :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 7ec4331122e7..4287aa391cf5 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -59,6 +59,7 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33) #define RISCV_HWPROBE_EXT_ZAM (1ULL << 34) #define RISCV_HWPROBE_EXT_ZACAS (1ULL << 35) +#define RISCV_HWPROBE_EXT_ZICOND (1ULL << 36) #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 abb0eea3ee08..d94f11534efa 100644 --- a/arch/riscv/kernel/sys_riscv.c +++ b/arch/riscv/kernel/sys_riscv.c @@ -177,6 +177,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZTSO); EXT_KEY(ZAM); EXT_KEY(ZACAS); + EXT_KEY(ZICOND); if (has_vector()) { EXT_KEY(ZVBB);