Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1364439rdh; Mon, 25 Sep 2023 10:21:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGePKkftgOcBmNSVQ0ZvYJEoQAgbVoJ3ao/BNfdlBs8hdMgHArF5DtVtqWt3ssyjVlwfpdQ X-Received: by 2002:a25:ab4e:0:b0:d87:a293:1224 with SMTP id u72-20020a25ab4e000000b00d87a2931224mr2403566ybi.50.1695662509778; Mon, 25 Sep 2023 10:21:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695662509; cv=none; d=google.com; s=arc-20160816; b=Fm9/99TpySSMuNANKsUdo4xFqC4T2RDhMlHHDFpNwhQavTkbKglyFSNKZ5OrzAZVgp fd+avi6E/g6Z9bK1zIcmjGr6MRjNyEFPptrHWNS+iBkKq3I22soyIOVxqkfQ1yQZ8cyy x8N1Wds6MigaLdlWEVqfE4ijqF8oub2GdedDh0bu56dcyvflIdwqo1BXes7ZZBtiMdB0 imMkwkDAkXfPnsZWYnS0Dcl/wFhaAmNWjdkHIPbCikauc5pS7FOCs2wvqdSRy5MEZo0r Y9BFXNGf2s52X+mo2nHrCqSlGA26nwl4OsdfbY7RCwALzCJGgPO8r+MpMSxAVlh+JHT2 IkCw== 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=hxe02J5CeYVcOEGcf8pNL/E6NkBfjDIHUjgTsmbzDPc=; fh=D+z95IW5vfJ94yfvCOG7az5ia4yk+bhMn5vz7aNqGYo=; b=oww6DxPrxUhjwqE0/UV+2+8lBwmiLbj1dd/HlwIg/edEIFex23v5ZvQzbhW0Fu7Dgu 8Oq61D67yHK34AeUrv8SJv5xymvtToVQRN7pJf/wd1HAnSGgcz0XGXs2HdLyvpzpx7yv PA8tA/mZsyPHCGxSvj35n6mut05ls22rbTuzonI68ls62CC9zd+R6sH2Ycyq4V1tJUcN eLPzsQmsZgVIKJkrgRVazqKBBM1tUOfUsz2VVGKnhOy182blAgdGlctSdVRgCOd19j5Z 3LmFE/jmykJq23qzyFK5+z7Tf2BQna4bhDqGh5aggAbqHK1FRTbU9Dr+/CQgsFDgWpYS Wi4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ftZVngTn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id y6-20020a63e246000000b00569161a1885si10001432pgj.288.2023.09.25.10.21.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 10:21:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ftZVngTn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 55ADD804C23B; Mon, 25 Sep 2023 06:32:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231766AbjIYNcH (ORCPT + 99 others); Mon, 25 Sep 2023 09:32:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231954AbjIYNcG (ORCPT ); Mon, 25 Sep 2023 09:32:06 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B00AB11C for ; Mon, 25 Sep 2023 06:31:59 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-565e54cb93aso3180170a12.3 for ; Mon, 25 Sep 2023 06:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1695648719; x=1696253519; 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=hxe02J5CeYVcOEGcf8pNL/E6NkBfjDIHUjgTsmbzDPc=; b=ftZVngTnplPi3cTNuVoQC66uDnjPOOT5cK7EL954SKSzq9yPkU6PCgfMKE5UflM4ja BvI7CITXpHAo+PwAPlS3g/aBJ0ZLaU5yEKkS9iXn7llENFX59fbyN8zqRo20NbWRw1Jt I5uV3l2xap7Q3La8E0pUzY2ozICnoe3zmIpn0ssqyYZA2WMqkg3gx5MzfOwDS5K8PXu7 oGbp+uxL1eBoq1yaLPS/KOU3zGfhymqqvTCe9AmP1tzn/RrZ0Ktsal208hDgYmxjYjCp UcOVGpDcF6DSXlObSqK9r6L85Tq7q7vIThErsC3VaqIwLI82WOJeaPSVrXdv3HM3LWz4 8PMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695648719; x=1696253519; 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=hxe02J5CeYVcOEGcf8pNL/E6NkBfjDIHUjgTsmbzDPc=; b=TNmVultfJw7qf8CsahaZ2pPtSBygZ2OxIy9CZGirsE80agVS15lJeYrcf/6lW+FK/L eNGmMjzgYhJRnD+46C4lyjE2RmwN4OlGGNb+KW7q7534jeMgI5pASN/1pe6Ym2gI7RUZ k5vJJ2VSTf70i+/OAnHxxl23KuPrLXWIiIb0l0qMwam46kac8bg3LJPLeds8a3voyp0c oHUIsZGh7ZP2PALWAoi6Tt9XIdZLWQNQIAMDDCTkNgjeggrUw2ZM0gtyIJFuBH7EetHa xJRtkN3aWqdomIg6BSpl+Cw14g+WDZnqH8o5EDCmKU7TzeXMSjEHo5djUjYPlklY4n3h Bk4w== X-Gm-Message-State: AOJu0YxihWh/+gg1dDbM8zgJ1kSYGuIoCTNlU0Oy+gKtkJRKbTJk66fS T2yxDmjr9swVV8SJEVh+JqpU89Oz3AQ3tBa2qOKzXWXHxppnL3Q0Tsk= X-Received: by 2002:a17:90a:f698:b0:271:9237:a07f with SMTP id cl24-20020a17090af69800b002719237a07fmr4386827pjb.32.1695648719052; Mon, 25 Sep 2023 06:31:59 -0700 (PDT) MIME-Version: 1.0 References: <20230919035343.1399389-1-apatel@ventanamicro.com> <20230919035343.1399389-3-apatel@ventanamicro.com> <20230920-36a5645f766ed9cce75a9e8c@orel> In-Reply-To: <20230920-36a5645f766ed9cce75a9e8c@orel> From: Anup Patel Date: Mon, 25 Sep 2023 19:01:48 +0530 Message-ID: Subject: Re: [PATCH 2/7] RISC-V: Detect Zicond from ISA string To: Andrew Jones Cc: Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Shuah Khan , 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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 25 Sep 2023 06:32:22 -0700 (PDT) On Wed, Sep 20, 2023 at 1:14=E2=80=AFPM Andrew Jones wrote: > > 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 > > --- > > 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. > > As of yesterday, v1.0 of the spec points at commit 95cf1f9 ("Add changes > requested by Ved during signoff") Okay, I will update. > > > + > > - 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), > > Zi extensions come before Zb extensions. Okay, I will update. > > > __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 > > > > Thanks, > drew Regards, Anup