Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2639466rdb; Wed, 4 Oct 2023 07:18:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkeRAhgjMgdqfyi7MMX83G5/il0qzkU+VPKNL/EJOST85jTMN/3tgehCuRMvKuNc2nTZDC X-Received: by 2002:a17:902:f7cf:b0:1c6:dcb:1e31 with SMTP id h15-20020a170902f7cf00b001c60dcb1e31mr2352948plw.4.1696429113895; Wed, 04 Oct 2023 07:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696429113; cv=none; d=google.com; s=arc-20160816; b=X9Uro6FY1kezdne7GfaPGnQZoTVH/aIEeMzKAyZqe9WmCfcNtKBCvNtawnYce+5ZYb 4dr50nIkrOszf2dngvyX0k4/RPb3RbV+W27MlGL6Fis4ZS5zMip7wm4FR1kBZmmWx9MC LtzfV4ua6rdrDJIEVTAW/c4jqhbngqpFqqdWKaTxeE7IvHA4D6OgKmKPXREYmer2S31T c6EWE6RUwmhtLaTvXo892o2ICebgKl4HPalX+QPOs5JOneHC46vlV2MHAnU0vkrqQb6O oOb6fR3h8gPds8Iwdlg2KQuu7TR/apkapJ3owZCy7LO6Yygqh0cvqTaj/2fR03rxijkq hJfw== 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 :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=0z/r1d+J5gtLqP5W7ywKcBZnz9e1tR93kK5cuzURK+U=; fh=Wha9lK4qLu27VEHkOObRIpQ8dHTAyda7LYy4IzuSLi0=; b=sMuyJ0H6+iy2Nfy7+kqjWtBhiOKJ/KoOy/043sK+2wQVdKVN8E9F+JDGS27v+lA/YV ZaBh4HmyvtzUomptChcv9LF6JiXlvBChds2/BUuxkIIxcnx1rkPAh+xAwnBVTKvS7jHZ 6TuDOk49BwmY1SE3y0O/rR91H13C43h0vGPcs/JnuhjBGJ8ymWGIXjyeXZ7IsxF9pvg5 8AgNpWVe4WHxk/2S1smnlSdXthsAcB2wxF7mzOsDV4fklHWsEijaDBdEQ2n+CjKi0vZ5 gaE28PMT87ffhWh06zMDQHYg9UEvG9EQ2iVTQqvQLWyatyny+YNr4AmKI8k/Ia8qUMbt 0TsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20230601.gappssmtp.com header.s=20230601 header.b=cL7TMIHv; 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 g7-20020a170902934700b001c62cfff799si3647752plp.176.2023.10.04.07.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 07:18:33 -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=@dabbelt-com.20230601.gappssmtp.com header.s=20230601 header.b=cL7TMIHv; 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 B755B8027DC5; Wed, 4 Oct 2023 07:18:32 -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 S233227AbjJDOS3 (ORCPT + 99 others); Wed, 4 Oct 2023 10:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242827AbjJDOHS (ORCPT ); Wed, 4 Oct 2023 10:07:18 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3AA6C1 for ; Wed, 4 Oct 2023 07:07:14 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-693375d2028so1685974b3a.2 for ; Wed, 04 Oct 2023 07:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20230601.gappssmtp.com; s=20230601; t=1696428434; x=1697033234; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=0z/r1d+J5gtLqP5W7ywKcBZnz9e1tR93kK5cuzURK+U=; b=cL7TMIHvZGILyvQKlG8/69OWPtzvqfwMYHT6bhdpd0Xiot1qkWGebg+HONm1NJG2T1 FXl8d6+z6Vp+L6nK1TfmMDLmwFgbnxEdG55WthmMNNUaBqS9t6Znn9UhaW5jUb30CgzU c7NEhpH9UYLE3ds2I61eoIMWuYcekbZbxlylI3faAyahjtr4B3uX8IWjYJlgyvtefOpa kJ6LgbtfM6AMJxux3ptSYePlndpQIsfEJwPwvJITYfUfRyw9SV/QyTNuci2tyzVws7UW CsVx+DMQtR2H0XQrTIGOjGA4j4odKJM/nTThLTYyH9KUUsyHv3Py9Kt5pFEwdozlN6LJ Mi6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696428434; x=1697033234; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0z/r1d+J5gtLqP5W7ywKcBZnz9e1tR93kK5cuzURK+U=; b=EuByKTTxOvHCNEhdqYZ+qOCuJqXbE9FnilQiteYWZyZFmg0LafilYoyId+7ke4CVHU cWd2gqRwUa8sBFM3LC9o4SaMXTN3s9+IwmIAwdv2eGvAc0Bs4azs9gmzEW8Dr1Zbobd9 nabt3PJ0dYI+BlDXqMMnhZIJtc8ILXB+cOImP97R+UkwJEXcPwGAapZUBPnM8fTTGD8z s6TWqeCa7G4lqYcbDCYNUBC+gL1iR8gY1kfSXgNsBoD2p4oD4xzxd95pBPdVl2PSb6ol FAfRHIZxMAsLg7kD0biZaApNQ3MG1QfsW2c5rdyRjaVfwXWm3n/f0Mh+251EhSq63Ef9 FRIg== X-Gm-Message-State: AOJu0Yyhnf/m1MZfV1qLvhw1r4bOkJ1edrl/tCINzwdA87QWsgdOUAPP L/QA9AGF0+w7cCBYRt2yCkIv1Z/85PmgAm5yVDk= X-Received: by 2002:a05:6a00:b8b:b0:68f:d1a7:1a3a with SMTP id g11-20020a056a000b8b00b0068fd1a71a3amr2957250pfj.8.1696428432808; Wed, 04 Oct 2023 07:07:12 -0700 (PDT) Received: from localhost ([192.184.165.199]) by smtp.gmail.com with ESMTPSA id bm2-20020a056a00320200b0068a13b0b300sm3384998pfb.11.2023.10.04.07.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 07:07:11 -0700 (PDT) Date: Wed, 04 Oct 2023 07:07:11 -0700 (PDT) X-Google-Original-Date: Wed, 04 Oct 2023 07:07:09 PDT (-0700) Subject: Re: [PATCH v3 2/6] RISC-V: Detect Zicond from ISA string In-Reply-To: <20231003035226.1945725-3-apatel@ventanamicro.com> CC: 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, apatel@ventanamicro.com, Conor Dooley From: Palmer Dabbelt To: apatel@ventanamicro.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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=ham 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]); Wed, 04 Oct 2023 07:18:32 -0700 (PDT) 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/hwcap.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/cpufeature.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[] = { > __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.