Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1626641rdh; Mon, 25 Sep 2023 20:42:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiZnkEYUZXT3EF1Egs1O7RZZf2t6rF6vjQC4GJeuBhXGuK/SaeEa2YnfS95KmQigldpVB5 X-Received: by 2002:a17:902:f80a:b0:1c6:294c:f89c with SMTP id ix10-20020a170902f80a00b001c6294cf89cmr2168320plb.63.1695699730148; Mon, 25 Sep 2023 20:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695699730; cv=none; d=google.com; s=arc-20160816; b=h1sdCghKr2RykEudGsaCxJkxXms4N5vaD2wUbo8weV6mJwyaG+B+OGwc3Ou4Pluj3M Is2R7kMrZZ0/2B6Z1jZ1bzSjdggb8mNY1RkQxVGT3bISYY412STXqKpmOt3feKeQpV2n HzJ2REWVe45c0mBRcNtc0FHcPkfmzEcyAmZI1H8TpwyAy3UeMj4sYq9pv7GTmtIEybFl yZXgF4llyDhstPkOrbzqW21YK9dlf36ncwwonsxeb91a/viMohyp0ERBx+ZwkI91+43w QO2Mx+fqSz59rnfQDru97X5fxYmseZ02+PviL1N094kZMFeujDZzIJErxBV1Ul75hHgM rIoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ZmJTmtECk3UTpEd/PcXzUGGmidlRTD2ZKXvirZ79/Ts=; fh=nlZopPRnVHu2vs567c1YBbvrY+A4AA3zlrk/3eN42As=; b=FpiyWGbjli45JG1wH72hHlhWBth6Nf5lwb1oP1pg85C/wprkvYGbnQe+9buHW4AAxi zgXLVJvI9XV+eCAKaqilXR2ur2wt3BwjHVqYVQVPmvfA68sfx85frBJwhqkoJ3ZK7BlB XIocFp7vCz/Pwl9UyZEVvzSbzKNpDLKb5yFSC64200/ixam/KdGTZV7KaUvjb4LkLFIb jMVhbrYjEB7TVRLL8bp9NmrTgnRSbwfIDT08rIiABp9J1F9P2J4tkBi2piesVOoggGuF Hh/+YSbRuliPnz/HK+N0kikZKDJoSSgLqn3Hto4S5pF5WnECDX4r40xClugsJmqafGXE HRWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=pbMALBir; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j15-20020a170902da8f00b001c5e1c94588si10895497plx.550.2023.09.25.20.42.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 20:42:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=pbMALBir; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 09F2F8246331; Mon, 25 Sep 2023 06:31:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231954AbjIYNbZ (ORCPT + 99 others); Mon, 25 Sep 2023 09:31:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231956AbjIYNbW (ORCPT ); Mon, 25 Sep 2023 09:31:22 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27D7F139 for ; Mon, 25 Sep 2023 06:31:14 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-578a91aca06so4986241a12.3 for ; Mon, 25 Sep 2023 06:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1695648673; x=1696253473; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZmJTmtECk3UTpEd/PcXzUGGmidlRTD2ZKXvirZ79/Ts=; b=pbMALBirw4CpLrzHlD/06L7U9fHjQm4D8U7M30OdVAYBd7fBWZJFO4PvcyQyqlzdtn ONp5qrZKfEmkgUIQ/tvjCHVpQXro6mpT63lfoI2KvSCn01berGNQeaMT4hMgDq/m36+t fNkWEFNwB2a8wKxqA+tYPnrqt+0g9RscPaU4kRRBnaV5CN816tLBXGIGqct9eiNdhP2O UVljwcj1K8NN9BwM/ZgtN2iLsH74TyEDEgGHc+2X6LkfxKYUC1iwvDYuvUgjy/B3eGMJ tA9V1wCL9tUwD/MWbUAdaIrOjwm8LnxUt7k+Lios0PvK93Dng6ZLdkceIE9/+neAqRIX wltw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695648673; x=1696253473; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZmJTmtECk3UTpEd/PcXzUGGmidlRTD2ZKXvirZ79/Ts=; b=oHGa7a7+am6/VRXXsd3Dt24hLfqnpTnMFtKZZAmGGdky2jor7ZHnPszYpE3uOEQs1f cmXTflt8F6DlQUdDbn2ls7yOth5y+4OpINHzyUO+gsZgWJQ1eE/n6lIRD13wjyeMIIhz cvpqqa5uIMLLMFILK27BCmjFIByNUriTnaPRa08nSf++zdLHjHCHFVp3kRhVjGuC9Pu5 WwwHoiSjZLGnO6YXXNcWOkP/XpA0PCoR2Sq6oMbTQe0ljXiglsOc1dgkOYCw2LFbw0df fYzCUGtMPhPRaDM7N6SFzPCmnK1FP1O0w5OQlVGIW6lXJywS4CigAqhOsE5PaneUoLqS RnPg== X-Gm-Message-State: AOJu0YxpJidiVeGtj+4Y5svxnXiMm6Gk2chBvgGrKew8iUfjCKjw7T3T FPi9xRk3tSGIvP9/J7mkfLsw7zAcewTK2/mQBYQUJg== X-Received: by 2002:a17:90b:4a4b:b0:26d:49c8:76d8 with SMTP id lb11-20020a17090b4a4b00b0026d49c876d8mr5801013pjb.18.1695648673541; Mon, 25 Sep 2023 06:31:13 -0700 (PDT) MIME-Version: 1.0 References: <20230919035343.1399389-1-apatel@ventanamicro.com> <20230919035343.1399389-3-apatel@ventanamicro.com> <20230919-3a8fcdaa86607d0ff8399132@fedora> In-Reply-To: <20230919-3a8fcdaa86607d0ff8399132@fedora> From: Anup Patel Date: Mon, 25 Sep 2023 19:01:02 +0530 Message-ID: Subject: Re: [PATCH 2/7] RISC-V: Detect Zicond from ISA string To: Conor Dooley Cc: Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , Rob Herring , Krzysztof Kozlowski , Shuah Khan , Andrew Jones , Mayuresh Chitale , devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 groat.vger.email 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 (groat.vger.email [0.0.0.0]); Mon, 25 Sep 2023 06:31:47 -0700 (PDT) On Tue, Sep 19, 2023 at 12:57=E2=80=AFPM Conor Dooley wr= ote: > > On Tue, Sep 19, 2023 at 09:23:38AM +0530, Anup Patel wrote: > > The RISC-V integer conditional (Zicond) operation extension defines > > standard conditional arithmetic and conditional-select/move operations > > which are inspired from the XVentanaCondOps extension. In fact, QEMU > > RISC-V also has support for emulating Zicond extension. > > > > Let us detect Zicond extension from ISA string available through > > DT or ACPI. > > > > Signed-off-by: Anup Patel > > Same applies here w.r.t. splitting in two. Okay, I will update. Regards, Anup > > Thanks, > Conor. > > > --- > > Documentation/devicetree/bindings/riscv/extensions.yaml | 6 ++++++ > > arch/riscv/include/asm/hwcap.h | 1 + > > arch/riscv/kernel/cpufeature.c | 1 + > > 3 files changed, 8 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/= Documentation/devicetree/bindings/riscv/extensions.yaml > > index cad8ef68eca7..7ea90e2dbc5b 100644 > > --- a/Documentation/devicetree/bindings/riscv/extensions.yaml > > +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml > > @@ -225,6 +225,12 @@ properties: > > ratified in the 20191213 version of the unprivileged ISA > > specification. > > > > + - const: zicond > > + description: > > + The standard Zicond extension for conditional arithmetic a= nd > > + conditional-select/move operations as ratified in commit 8= fb6694 > > + ("Update Gemfile") of riscv-zicond. > > + > > - const: zicsr > > description: | > > The standard Zicsr extension for control and status regist= er > > diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hw= cap.h > > index b7efe9e2fa89..15bafc02ffd4 100644 > > --- a/arch/riscv/include/asm/hwcap.h > > +++ b/arch/riscv/include/asm/hwcap.h > > @@ -60,6 +60,7 @@ > > #define RISCV_ISA_EXT_ZIHPM 42 > > #define RISCV_ISA_EXT_SMSTATEEN 43 > > #define RISCV_ISA_EXT_XVENTANACONDOPS 44 > > +#define RISCV_ISA_EXT_ZICOND 45 > > > > #define RISCV_ISA_EXT_MAX 64 > > > > diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeat= ure.c > > index 3a31d34fe709..49b6551f3347 100644 > > --- a/arch/riscv/kernel/cpufeature.c > > +++ b/arch/riscv/kernel/cpufeature.c > > @@ -174,6 +174,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] =3D= { > > __RISCV_ISA_EXT_DATA(zba, RISCV_ISA_EXT_ZBA), > > __RISCV_ISA_EXT_DATA(zbb, RISCV_ISA_EXT_ZBB), > > __RISCV_ISA_EXT_DATA(zbs, RISCV_ISA_EXT_ZBS), > > + __RISCV_ISA_EXT_DATA(zicond, RISCV_ISA_EXT_ZICOND), > > __RISCV_ISA_EXT_DATA(smaia, RISCV_ISA_EXT_SMAIA), > > __RISCV_ISA_EXT_DATA(smstateen, RISCV_ISA_EXT_SMSTATEEN), > > __RISCV_ISA_EXT_DATA(ssaia, RISCV_ISA_EXT_SSAIA), > > -- > > 2.34.1 > >