Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1433345rdh; Mon, 25 Sep 2023 12:38:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFiytwphXzec03pghWt4PMBtpHpRsnFdIlpVupB3LXnBqvwI3TENTvFDJ9pzIfzuIhRTDU5 X-Received: by 2002:a17:90a:af82:b0:263:9e9b:5586 with SMTP id w2-20020a17090aaf8200b002639e9b5586mr5310032pjq.44.1695670730191; Mon, 25 Sep 2023 12:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695670730; cv=none; d=google.com; s=arc-20160816; b=ShEq8ce/AQTwTE+D1G2LIwvtJ4ssNcet9vlANODEkuWqbnT4ubGtqd1j6XrtpEenc7 DVdJZaqpCJ9xHbE92TX54dyIjgBag+uhuASkq2k9FmiCEHRhQXgREVSwThDlhDuCI8xB XZhmR0jB8yQnN61719XfipW124rxpzhf48VVT1woDVNzaCjuOP3JsJhZ3phkvrQblZAW Z6xVBkz8zcXIZtevmuVpE0Ou71eN1g/XvsYi8s1QalqAEHToa3uOnHNgVHzSkEjzvTQe eR357S09KDsaNOWX+t0CDwW943MqT664cEUs6Vd8O9+ycMNSa/6lfgMdXhGXhjhevWkF od5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=w3Y94KioZ4lUB6KTiVYafyhITdpeQDnL5Ld1MTAmwrE=; fh=vy7D0OYcPZh9HXWp2KA8VVDgG1BWaCTF4Kp9ALvlhso=; b=aef2RxZoTn2zwcwEJwQLq33wyLhhLp6wf/H29k0nJbiB1KMbsfgJh4o1BSQbgnx/rj HSEk1iXSnsA6OHuYJ4TTNI5tGs4zlrRZdVREGzPBOaVa5HQHURuVEYqsqCFf1oDelmKq BqxIA4KMLmrbtFU3QUirtxEaR7hXGY+aFKMN2cM7IwGpyA1V/jS4exUji2edesuGsUD3 BNaq8xa3oqe16en4rEIGZC3pvmJcQYvyGarQTeQ2UnwirJwqqRTn7OMP+WLDbFvVtzlv mLF4pldtkJoUoJxSGoMarYU43wkSv4cnZzJq4zI0hTCmk4DlL9c9+oEgnTPibSkcYjQ+ I36w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=hfUBVOCF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id e4-20020a17090a804400b0026b7c4eee42si12627229pjw.66.2023.09.25.12.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 12:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=hfUBVOCF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 789C9804C4B7; Mon, 25 Sep 2023 07:13:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231358AbjIYONx (ORCPT + 99 others); Mon, 25 Sep 2023 10:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230448AbjIYONv (ORCPT ); Mon, 25 Sep 2023 10:13:51 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B58DC11B for ; Mon, 25 Sep 2023 07:13:43 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-532c66a105bso7589962a12.3 for ; Mon, 25 Sep 2023 07:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1695651222; x=1696256022; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=w3Y94KioZ4lUB6KTiVYafyhITdpeQDnL5Ld1MTAmwrE=; b=hfUBVOCFs3JQ8XJruqqfgzplqM+0J404RkIxvxayfzutmyY+gvOenIAsUzgTOoQ9o0 YvvU44CgTV1BqgcdL/Wpp27xlxsBqT6mHtm22EO+/sDc8USVegMlDg1YDZaY1qAi/Tj4 8Te9J7g5jZZD0Ya1m0omDV1rBCeCQj3YZmP0rM0VAmDCsVERGSeP4AMs8qq6O5NlGlOW kIMePhgX2nvtT1N5DMgwWWVR7jYZm8sfel2iOcAKMHeDz/353ychoNTTtEBJdK2lhSpC TTpEh1+xUWe28EheibJ/GWMXN3rdY9OrXF+AVhnLPp2zx3th8hcWmdZm6dHw3xNkglps 4IjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695651222; x=1696256022; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=w3Y94KioZ4lUB6KTiVYafyhITdpeQDnL5Ld1MTAmwrE=; b=UuJgZ6XzFJpgIncFDKPx2wEn0vVDPxZB/qc2MCu3PLgxNFqiLG6aNs3n8WjnknHkVE Xik1Myqa4C+Vk8hBMJg4PgRar0zcpVrrxirh/ecUK6bAQ0t5UBqq36tk1rMs+17Wvrgf z0r4bqfxQTd5ldX0ezzxxQ8WQSF9M2PafWED+0Qc6+5UxtskNV80F5TzhILMk1cLXOqj FpujIlc5DmXxV7ooU24CLPb2sraZW2iD7bSrdPu4aI1lGV7iGcl0RQ8D8GoOVrrUW2an tc/LkXMnfJvC+AMvlkeiHu2kQD5QenyOkglYr5bO0V/4bt6pDRabzZ2I5Ci6hm6lKh5n Cy+Q== X-Gm-Message-State: AOJu0Yyqen1ZuWD9pfQkgVaD2TTuxathAHKkLVnLyE8qZ2F7GrYI7f0R Ft/+T4nLqg+61hBCZA9z8JF5gQ== X-Received: by 2002:aa7:c481:0:b0:52c:b469:bafd with SMTP id m1-20020aa7c481000000b0052cb469bafdmr4951595edq.41.1695651222046; Mon, 25 Sep 2023 07:13:42 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id n18-20020a05640206d200b005224d960e66sm5533135edy.96.2023.09.25.07.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 07:13:41 -0700 (PDT) Date: Mon, 25 Sep 2023 16:13:40 +0200 From: Andrew Jones To: Anup Patel 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 Subject: Re: [PATCH v2 4/9] RISC-V: Detect Zicond from ISA string Message-ID: <20230925-434ad7cfaea0011fe0fb9989@orel> References: <20230925133859.1735879-1-apatel@ventanamicro.com> <20230925133859.1735879-5-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230925133859.1735879-5-apatel@ventanamicro.com> 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 25 Sep 2023 07:13:58 -0700 (PDT) On Mon, Sep 25, 2023 at 07:08:54PM +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 > --- > 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 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/cpufeature.c > index 3a31d34fe709..7f683916f2c2 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), > -- > 2.34.1 > Reviewed-by: Andrew Jones