Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp337795rdb; Thu, 5 Oct 2023 07:27:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPOu3ka5Wu+3NnivxCyWgr/1qi3dN3jpcNnqwzI62ySKLIVrHUzb4VEyTUpj7Ry411fBHC X-Received: by 2002:a17:902:bc4b:b0:1c5:df3f:89e5 with SMTP id t11-20020a170902bc4b00b001c5df3f89e5mr5396603plz.62.1696516024414; Thu, 05 Oct 2023 07:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696516024; cv=none; d=google.com; s=arc-20160816; b=k46KpQOBv4TR14G9L7hkPnerxU63xcqzdaiOcXjJ3u5MADcEcLMx6ZiUNt4civXBHd BT0ATp4UxxFwBiwh7dcBlK2W1TSEDUrK0DP8XixF5jrechliN2So29j2sUwt9OAPAJsm ti2Q1+d0bktDjiVa+CJ21STx3f97rLRtt1qLi7g3xb/if54YfrB94a/YH+YbhbKytmms NuoVGpMCBSF4I/4r701cWqj8tK/q8IwJjDCJyIm7YKNABtWNm/K/wVuV8irdXVdg6Q5K +Z5Xyf0y0i5fI0CCGQ1GHKxiCVR6j6TS8y5FzH+sd2h5xX4f0RiUTsr9ys9Jl2JnICA5 Pfpg== 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=IAn7kTF76MX4baCsjz/DD87LgbEJOFPnszS1gD87MLo=; fh=DM0quZCAUQ1J2ri94xIb3GbxHuZgy7fsN98BJlhBh4Y=; b=vI0CuAnuOENE9URFB24ABEzzQIqKlpCM7Z7BkbuA5uWytu4CqMeIzNPPNM25w88SAI LnZpz1iCOc+JKKKkBigbbVDykFYnV/wXRzp8GY8T99MFk/iGWLbz5flfBIUH7Dferlix RT2wZBiiZK4aiDzehzxt/hHgpDhrK+I2YOln3sq+z+JVyZ13jCWkHTbpXUZ4cltV2WWL fDGfTEztj0oUxjntk5SOOozWuYhKXYLlxysnqwN2a3ZAkV78yfSY1JDrybRa0XHeMCoV /Y7wEiuCbiQGYbDanDmoCbmWsNZc59RRXQiggqKoB5HpHl1jmMKT8ySOgAII7gfsOL7i piDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20230601.gappssmtp.com header.s=20230601 header.b="ZXubW7/Q"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id kp5-20020a170903280500b001c446b59c8dsi1516197plb.271.2023.10.05.07.27.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 07:27:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20230601.gappssmtp.com header.s=20230601 header.b="ZXubW7/Q"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 2E34B80A1471; Thu, 5 Oct 2023 07:25:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233807AbjJEOZH (ORCPT + 99 others); Thu, 5 Oct 2023 10:25:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233278AbjJEOXC (ORCPT ); Thu, 5 Oct 2023 10:23:02 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B45F59FD for ; Wed, 4 Oct 2023 22:51:00 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-51b4ef5378bso431664a12.1 for ; Wed, 04 Oct 2023 22:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20230601.gappssmtp.com; s=20230601; t=1696485060; x=1697089860; 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=IAn7kTF76MX4baCsjz/DD87LgbEJOFPnszS1gD87MLo=; b=ZXubW7/QRu9lfTWrHyJPGHvyKFEbmAjEGsA43lpb7Aa1B5q0XjQmR8aY6/JMLTFW6d LPSWr2Ds4/22GFtcQ/9KzR28OoFbFkzZuaf/Cr1iE7cPrQre79m0GookUWiIvChHBIyD nwi6+MkCNAcKtTcb18oWw9GtyZ4cxW2Or03HqHrNSE3OY4b777U/GoD/PFu5kxxK0VQi bFuyj6U47r4kUsPOlP4MYPFSubLZEb0fCnFgIByCYMoXS79N9lpdNH5AftJZuOuRPM3l bpY9o14EBhXWKmB5o1ri0uEmRyy+3BYQPNVsmgKJoz2UgwcKGHU96ndyPlbaFh5YHpaU ge2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696485060; x=1697089860; 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=IAn7kTF76MX4baCsjz/DD87LgbEJOFPnszS1gD87MLo=; b=nZUBGPkzZOjhM9opXFtfcNUKF56USzQefclDbYgV+5pNW04JopPuVL9YFqYe/cf7V1 aSLpWWaO8fm9PgCaxcU3kI6561+Yvojg+PNJr5nCvaGMYDNpq7e2n8qlpeyw3rf0D5dt 573xmq+B++2HksGJ/7naJeF9UEUJaeGysbilGCpqYTWepv4LlQTWEf1v7OBdmeQrTo7H jFQYP5XOOx+uknB71ZskycVGSjpHQRI4vw7If21busQ307Z1yci6E1wsaEffdBJNUBRt eAX/OqAOCajSZGUxdirMG+JxcDMT9EDSDti4jZ/DyN+85vaurrH4CdnNcgVZDQ4CR1Fl IcIQ== X-Gm-Message-State: AOJu0YwzN511HJwu2HHyCww6b0s7eo/BB5MBVONsXQQ2RUWEIKXgtqHA 32xJ3l2yKg87HfMiOxvFfthCxbBQ3zK/9+XDkj60biUJz3k7tlJ4 X-Received: by 2002:a17:90b:a04:b0:26d:416a:b027 with SMTP id gg4-20020a17090b0a0400b0026d416ab027mr4208863pjb.31.1696485059836; Wed, 04 Oct 2023 22:50:59 -0700 (PDT) MIME-Version: 1.0 References: <20231003035226.1945725-3-apatel@ventanamicro.com> In-Reply-To: From: Anup Patel Date: Thu, 5 Oct 2023 11:20:48 +0530 Message-ID: Subject: Re: [PATCH v3 2/6] RISC-V: Detect Zicond from ISA string To: Palmer Dabbelt Cc: apatel@ventanamicro.com, pbonzini@redhat.com, atishp@atishpatra.org, Paul Walmsley , Conor Dooley , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shuah@kernel.org, ajones@ventanamicro.com, mchitale@ventanamicro.com, 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, Conor Dooley Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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_NONE,URIBL_BLOCKED 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 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 07:25:41 -0700 (PDT) On Wed, Oct 4, 2023 at 7:37=E2=80=AFPM Palmer Dabbelt = wrote: > > On Mon, 02 Oct 2023 20:52:22 PDT (-0700), apatel@ventanamicro.com 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 > > Reviewed-by: Andrew Jones > > Reviewed-by: Conor Dooley > > --- > > 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/hw= cap.h > > index 0f520f7d058a..6fc51c1b34cf 100644 > > --- a/arch/riscv/include/asm/hwcap.h > > +++ b/arch/riscv/include/asm/hwcap.h > > @@ -59,6 +59,7 @@ > > #define RISCV_ISA_EXT_ZIFENCEI 41 > > #define RISCV_ISA_EXT_ZIHPM 42 > > #define RISCV_ISA_EXT_SMSTATEEN 43 > > +#define RISCV_ISA_EXT_ZICOND 44 > > > > #define RISCV_ISA_EXT_MAX 64 > > > > diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeat= ure.c > > index 3755a8c2a9de..e3803822ab5a 100644 > > --- a/arch/riscv/kernel/cpufeature.c > > +++ b/arch/riscv/kernel/cpufeature.c > > @@ -167,6 +167,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] =3D= { > > __RISCV_ISA_EXT_DATA(zicbom, RISCV_ISA_EXT_ZICBOM), > > __RISCV_ISA_EXT_DATA(zicboz, RISCV_ISA_EXT_ZICBOZ), > > __RISCV_ISA_EXT_DATA(zicntr, RISCV_ISA_EXT_ZICNTR), > > + __RISCV_ISA_EXT_DATA(zicond, RISCV_ISA_EXT_ZICOND), > > __RISCV_ISA_EXT_DATA(zicsr, RISCV_ISA_EXT_ZICSR), > > __RISCV_ISA_EXT_DATA(zifencei, RISCV_ISA_EXT_ZIFENCEI), > > __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE), > > Acked-by: Palmer Dabbelt > > Can we do a shared tag, though? These will conflict. Thanks Palmer. I will provide a shared tag based on 6.6-rc5 sometime next week. I hope this is okay for you. Regards, Anup > > -- > kvm-riscv mailing list > kvm-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/kvm-riscv