From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B6FA16089A for ; Wed, 1 May 2024 19:48:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714592899; cv=none; b=cMtJiFov2hy2xs7sP0+C1LnNpSWT8c8JfQu8t4UXK4EYk7n+lxaVx4Gr63gNHpzpfrNDzFwN0oy89VrKluVzf5C78w16FCOyzdKTh2vyqY41psEh9vVn9w0rLmdAl1cqK6sUvyNKL6J1F5dfLEOolyGpvxwL8W/PovPmgmOSfwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714592899; c=relaxed/simple; bh=0xusBx4mvpGkzkWD4XBTeQoGUcYyDndMqcZwmTR7iPg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XwchsWL1R7We7fXi7GgV1OY4gufJaDEXSZPeAMQjtYebH38XsgpDbu7kBi8L+wJcUi0gQYN5YGJBTB1hms8P0u4IFBJ0O/BeQdF9zq8iUUUjh3T9DrCkbhYfOOc/dzN7d+BuphzSeWd2C/pEHPomEC67iK2hVkOtUcbidJxxQls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=iwWN7QxB; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="iwWN7QxB" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1e4bf0b3e06so71459425ad.1 for ; Wed, 01 May 2024 12:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714592897; x=1715197697; 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=JtC8dm20imTdKCQqTW5smBrp6Y6uvCPu1xFL49hxPB8=; b=iwWN7QxBz4DTHm1qm4OvpmvNaVrshOl+oNlLUJKpgpYips6mizmNWeGngZ7RT2SCYn 6kyWULXJJiRSqRABB3YLom9mKVl7O1GRH3fO9iv+zXLQZvX8IujkF5/OkVWuuIxYIvHk czSTItxHcV3PGWm9icjiVq4AXktjZRr5Kg93KsO6cUnLQ2Jc5ZldYY/TJ7lZNBsay4yN 104GtD7bPaL5esKEKFEBLc2v7xelq7wUgkZrgAtJs7G50S0j5ehcLdzzk9mP//qrHDox kvR0sCoMr2n5O61swCfODCxdsx5HGrewfmkIb63uTPTpCi4pYISkNFaS/0d+8/TuLx3b 8NGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714592897; x=1715197697; 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=JtC8dm20imTdKCQqTW5smBrp6Y6uvCPu1xFL49hxPB8=; b=qPwVv8ovb2VsecNqefS+90pJuhhIHYFgYoNpgWgIiGfs/djipYHRaIVWCGBKI5eDXj 8KAJmTjYrDy59tTn/4W2ok1aVp2ECS5KgOXHLsNIA4RZSaIg8obw7FUjMs2EpHlAK8/v dYUEct0X3W0DfhD+y/1sqqUKPMPn+qyJ91yPljoeSanSPUNIf9Dq1Pg2RrAtf/MgU1a1 qLTCTwKiUfiKTUKgczOUcL8iqoxPtCAIwYHJQQj3COfDFL8672QW2SEkXjy7bimeGBR3 gWu4uhTCgTYuGnDO7QcxsWYnhKum6gTfMVH59Bp/0/mcIkr7Fa3T91nI+mRR49DZ36MM mHvA== X-Forwarded-Encrypted: i=1; AJvYcCX1q2YlrjmlBSQMJeNOL2X4EvTwuduqo+7qgO3fxEg2SirhPZcMtBRD+RCdvGHrz8W1Fn9tz3EYQSJbqdiknOY1rgm/oaB2Uyh1 X-Gm-Message-State: AOJu0YzVnoZ+Yw+NRHEBxSR4kEx25SzRxKMNRn4pdaznaZZmgzza/Xgs SypYUqfCIYd3M/4HeuhhEca8Ne1AgxISNcxYk6gN+Fei5E3Ibgvon99iLjp8XSc= X-Google-Smtp-Source: AGHT+IHqE9T7lF1XvjCAtRw9iaYnvm5Bt1x7gAa4owqnGBOgOTMkA2A37jDPqx0fFTLOHQocKAXYtQ== X-Received: by 2002:a17:902:d506:b0:1eb:2fa0:c56f with SMTP id b6-20020a170902d50600b001eb2fa0c56fmr4034243plg.35.1714592897320; Wed, 01 May 2024 12:48:17 -0700 (PDT) Received: from ghost ([2601:647:5700:6860:1dcc:e03e:dc61:895d]) by smtp.gmail.com with ESMTPSA id j10-20020a17090276ca00b001dd69aca213sm24321702plt.270.2024.05.01.12.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 12:48:16 -0700 (PDT) Date: Wed, 1 May 2024 12:48:13 -0700 From: Charlie Jenkins To: Conor Dooley Cc: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Jonathan Corbet , Shuah Khan , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 07/16] riscv: cpufeature: Extract common elements from extension checking Message-ID: References: <20240426-dev-charlie-support_thead_vector_6_9-v4-0-b692f3c516ec@rivosinc.com> <20240426-dev-charlie-support_thead_vector_6_9-v4-7-b692f3c516ec@rivosinc.com> <20240501-probable-unfunded-746ef6ae1853@spud> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240501-probable-unfunded-746ef6ae1853@spud> On Wed, May 01, 2024 at 12:37:14PM +0100, Conor Dooley wrote: > On Fri, Apr 26, 2024 at 02:29:21PM -0700, Charlie Jenkins wrote: > > The __riscv_has_extension_likely() and __riscv_has_extension_unlikely() > > functions from the vendor_extensions.h can be used to simplify the > > standard extension checking code as well. Migrate those functions to > > cpufeature.h and reorganize the code in the file to use the functions. > > > > Signed-off-by: Charlie Jenkins > > --- > > arch/riscv/include/asm/cpufeature.h | 78 +++++++++++++++++------------- > > arch/riscv/include/asm/vendor_extensions.h | 28 ----------- > > 2 files changed, 44 insertions(+), 62 deletions(-) > > > > diff --git a/arch/riscv/include/asm/cpufeature.h b/arch/riscv/include/asm/cpufeature.h > > index fedd479ccfd1..17896ec9ec11 100644 > > --- a/arch/riscv/include/asm/cpufeature.h > > +++ b/arch/riscv/include/asm/cpufeature.h > > @@ -98,59 +98,66 @@ extern bool riscv_isa_fallback; > > > > unsigned long riscv_isa_extension_base(const unsigned long *isa_bitmap); > > > > +#define EXT_ALL_VENDORS 0 > > It's not really "all vendors", it's standard. Otherwise, this seems all This hooks up into the alternatives: ALTERNATIVE("nop", "j %l[l_yes]", %[vendor], %[ext], 1) Where the "vendor" argument is supposed to be 0 if the alternative is applicable to all vendors. Is there a better way to convey this? - Charlie > grand to me, > Reviewed-by: Conor Dooley > > Cheers, > Conor. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57441C4345F for ; Wed, 1 May 2024 19:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fw4DUfUK3cW3WgKj3wWpLWbTJxc5xqNv8F21QI4Izoo=; b=iyOgbmfssHzUoA FXTax3xNSybPwDQpu80OmK/IF4Rzn0Ihw48qIBusY5/umoNHLKMhPTFMm97WJQaVxiUPnEDme+ihA GCS9W0wWGqVvTkaCDkoJt7VoUQ/s7bsnzNduVSKutWIzuvkHXv2EhnzsY7P7VlD7wUYwxb+vgJor5 Cn175MWvFSEPwvUFp46bWbE6GP8BRgkKCUJDPEMZAOMNIbKW/7Sbkkq2yKVDaqBsPtEc2YMgpJl5/ utAMrDUVqjghPOeNWkPnnCsyJalWI1JHBuaylsuA6ORX2T0hEV4yho4pCckYZqdkFBKxBOwd9TfYM w6q91hMhgo9p3ejSJvxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2FwF-0000000AYdh-2knv; Wed, 01 May 2024 19:48:23 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2FwB-0000000AYcp-1Xrj for linux-riscv@lists.infradead.org; Wed, 01 May 2024 19:48:21 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1e4bf0b3e06so71459435ad.1 for ; Wed, 01 May 2024 12:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714592897; x=1715197697; darn=lists.infradead.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=JtC8dm20imTdKCQqTW5smBrp6Y6uvCPu1xFL49hxPB8=; b=ynOGnBHawVVnMiEXlKFHKUCW0PCDtGvqD1Ef3J+MKjjBF7Sf44W+K71wHV+5zuEtgj cgEYh+pEO9s5T6SjaW4b0lACfn9/xeXVWR9Lp2tNL5Q1100moEbI2EiSzJtdNiR6afat +Kyn5TXxFWB8r5JSya9EJ90RqNmdCLQ951c2ttlsC4FHuTilUR6rdOf8++32vacgPMKM 9fayXgLSVhiyn1ydptmiONkSBueRv7PjtfmfRKyu5tYNi9g03v+AmNVy48DPkOKYmAm0 zeqKOYBqeFi33kxdYe0mRKB/mxImFZysOMQ8fQ7lza10zL+h5IycEFofTtMlP1E6Gzc5 HcJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714592897; x=1715197697; 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=JtC8dm20imTdKCQqTW5smBrp6Y6uvCPu1xFL49hxPB8=; b=LqR9XksH6ifAfugIAHtVCpPW4LtWVMQ98k6AVkIeyCJevyPmKz7wjGxCo+5rGltbEH SzX5VzQ/hrPTgBGzQQkD6DYxo0cNaeo7oED4fQ59XkXzgkikB3OlzmFhvyVm/Dstm/A6 30Hb4g/DAIavkxW1XDzIAjCGd5KEBadZZ6QPOTZisT2ixe9KuEYh2aDupF3+UQNzINtd MOaLKKcMeeM2gfe0KKBRteGtY3Ikut6zTStwOzKldZt7yi0+aeFK6bj8LjtZjAh5qYeO nDB3/xYgPVYGL4BI8oTZGniur5DlPYUe1RNSRsH0v5dlKul6teVy3Il3mewCruDi2D7n Lvtg== X-Forwarded-Encrypted: i=1; AJvYcCUyhWCeHiS6eMTyryUjEaGC4OAp8uB5iATMId5KgAscvxMYeHLzEbHZH1qOx4D0jpNKj4Uj3Dt6dk/zeWNCWX7YJXsapK26uK1/i5mqyLS0 X-Gm-Message-State: AOJu0Yzg9etCGeZy3yF0ZL6LWazg/deA8mdUI6UYbQAef6OR3KTrWW8/ EDWIknBsDglIPR7DHsUH2VwldlWac2tA+SA3lcN6qSoGSXKGSm7gLfTUMFBbRRFfZ+MRqHTpJNl M X-Google-Smtp-Source: AGHT+IHqE9T7lF1XvjCAtRw9iaYnvm5Bt1x7gAa4owqnGBOgOTMkA2A37jDPqx0fFTLOHQocKAXYtQ== X-Received: by 2002:a17:902:d506:b0:1eb:2fa0:c56f with SMTP id b6-20020a170902d50600b001eb2fa0c56fmr4034243plg.35.1714592897320; Wed, 01 May 2024 12:48:17 -0700 (PDT) Received: from ghost ([2601:647:5700:6860:1dcc:e03e:dc61:895d]) by smtp.gmail.com with ESMTPSA id j10-20020a17090276ca00b001dd69aca213sm24321702plt.270.2024.05.01.12.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 12:48:16 -0700 (PDT) Date: Wed, 1 May 2024 12:48:13 -0700 From: Charlie Jenkins To: Conor Dooley Cc: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Jonathan Corbet , Shuah Khan , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 07/16] riscv: cpufeature: Extract common elements from extension checking Message-ID: References: <20240426-dev-charlie-support_thead_vector_6_9-v4-0-b692f3c516ec@rivosinc.com> <20240426-dev-charlie-support_thead_vector_6_9-v4-7-b692f3c516ec@rivosinc.com> <20240501-probable-unfunded-746ef6ae1853@spud> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240501-probable-unfunded-746ef6ae1853@spud> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_124819_552749_81D55BCA X-CRM114-Status: GOOD ( 21.77 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, May 01, 2024 at 12:37:14PM +0100, Conor Dooley wrote: > On Fri, Apr 26, 2024 at 02:29:21PM -0700, Charlie Jenkins wrote: > > The __riscv_has_extension_likely() and __riscv_has_extension_unlikely() > > functions from the vendor_extensions.h can be used to simplify the > > standard extension checking code as well. Migrate those functions to > > cpufeature.h and reorganize the code in the file to use the functions. > > > > Signed-off-by: Charlie Jenkins > > --- > > arch/riscv/include/asm/cpufeature.h | 78 +++++++++++++++++------------- > > arch/riscv/include/asm/vendor_extensions.h | 28 ----------- > > 2 files changed, 44 insertions(+), 62 deletions(-) > > > > diff --git a/arch/riscv/include/asm/cpufeature.h b/arch/riscv/include/asm/cpufeature.h > > index fedd479ccfd1..17896ec9ec11 100644 > > --- a/arch/riscv/include/asm/cpufeature.h > > +++ b/arch/riscv/include/asm/cpufeature.h > > @@ -98,59 +98,66 @@ extern bool riscv_isa_fallback; > > > > unsigned long riscv_isa_extension_base(const unsigned long *isa_bitmap); > > > > +#define EXT_ALL_VENDORS 0 > > It's not really "all vendors", it's standard. Otherwise, this seems all This hooks up into the alternatives: ALTERNATIVE("nop", "j %l[l_yes]", %[vendor], %[ext], 1) Where the "vendor" argument is supposed to be 0 if the alternative is applicable to all vendors. Is there a better way to convey this? - Charlie > grand to me, > Reviewed-by: Conor Dooley > > Cheers, > Conor. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 481B3C4345F for ; Wed, 1 May 2024 19:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xvXkKLO07B96T3CszUlCL7BVfA1APqmDjAcJQl1UFfw=; b=XqCZB0+V19l9o9 hqHqyfQ1YjGkW2VlYYnTFJQOMzsrxSbH3S2QqSdBCIjlR42Kvyw2EJOqdOb0UXEnq+DXKNz/a+B2m XKQCioUf49kVtU9OP4EVeTKvU/eXBovipG38ZaEIkf0hYRSmpt3F0yevkHd8mFdVqGKhyI1wSzcwJ NbnxErAOpjS0okKD1n5WTvsfkGnDP4PJvK9agUuEZjsAysZpsMqycaR8htIeNPkSAKn4e+b6nSZw7 +3DJU56JHDPN2nuAmSyIrEhXUMKWWWczr5ID9PspZAbL/cjj7YvjXTlHeMXwZIYhpS5vQoe0tW9mX bEk3mvai6rHhha58WTnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2FwF-0000000AYdc-05u2; Wed, 01 May 2024 19:48:23 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2FwB-0000000AYcq-1Xl1 for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 19:48:21 +0000 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1e4bf0b3e06so71459445ad.1 for ; Wed, 01 May 2024 12:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714592897; x=1715197697; darn=lists.infradead.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=JtC8dm20imTdKCQqTW5smBrp6Y6uvCPu1xFL49hxPB8=; b=ynOGnBHawVVnMiEXlKFHKUCW0PCDtGvqD1Ef3J+MKjjBF7Sf44W+K71wHV+5zuEtgj cgEYh+pEO9s5T6SjaW4b0lACfn9/xeXVWR9Lp2tNL5Q1100moEbI2EiSzJtdNiR6afat +Kyn5TXxFWB8r5JSya9EJ90RqNmdCLQ951c2ttlsC4FHuTilUR6rdOf8++32vacgPMKM 9fayXgLSVhiyn1ydptmiONkSBueRv7PjtfmfRKyu5tYNi9g03v+AmNVy48DPkOKYmAm0 zeqKOYBqeFi33kxdYe0mRKB/mxImFZysOMQ8fQ7lza10zL+h5IycEFofTtMlP1E6Gzc5 HcJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714592897; x=1715197697; 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=JtC8dm20imTdKCQqTW5smBrp6Y6uvCPu1xFL49hxPB8=; b=dfqk+qnr/oqoS9MXUVv8BLj8VB68NA/o0EydDm6UvPUzfRZ8qcPZZfEZ9akKu2H+bf bPKaJqut5Pd8o8TI7jKfab4x3EunSe9QFnT3sSzh5puAQ9w04ALS0atVhU8Zwx4x2kod SBHkTCG5FnUUKhrba/cOmWnhxbCeRohOlXx6nDxlIXGDEZeuYGcRbbWQv6yiXOF88MaR n5DO/8RuMhVSm+l5EftCV9RvbM8XlSSci1Bjn/LbX1YMYPHfsH/xY8FIkSCQ4YSANqlv FqXvTHyq3/3eCNhD6x3OY9q994crgD2oQXko4ye43RkheNi6UIoQBt+W/D87EVyAJnyY iu9g== X-Forwarded-Encrypted: i=1; AJvYcCUoMKyDUQafMtw4J9nGtbaZ+Jc8/ZLhcaWuIKAaEy/UNtUNUlz/9kbq3f0X+MNVzNCIrsKAl7+63M+I/Pck0SmnGUm+jz6JRAiSLWlOuFo0lvX3HkY= X-Gm-Message-State: AOJu0Yx8hBZqgq7qxg6Nvz3yqL48ZUi+IYcdNxEUIjOBYyyWmWr3CESR lERaUoPcGwHT+HdK3L2QuFFY1Kk3lD9+fykhTDb1yeJX3OvYpo+OfTDZm+g7gas= X-Google-Smtp-Source: AGHT+IHqE9T7lF1XvjCAtRw9iaYnvm5Bt1x7gAa4owqnGBOgOTMkA2A37jDPqx0fFTLOHQocKAXYtQ== X-Received: by 2002:a17:902:d506:b0:1eb:2fa0:c56f with SMTP id b6-20020a170902d50600b001eb2fa0c56fmr4034243plg.35.1714592897320; Wed, 01 May 2024 12:48:17 -0700 (PDT) Received: from ghost ([2601:647:5700:6860:1dcc:e03e:dc61:895d]) by smtp.gmail.com with ESMTPSA id j10-20020a17090276ca00b001dd69aca213sm24321702plt.270.2024.05.01.12.48.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 12:48:16 -0700 (PDT) Date: Wed, 1 May 2024 12:48:13 -0700 From: Charlie Jenkins To: Conor Dooley Cc: Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Jonathan Corbet , Shuah Khan , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 07/16] riscv: cpufeature: Extract common elements from extension checking Message-ID: References: <20240426-dev-charlie-support_thead_vector_6_9-v4-0-b692f3c516ec@rivosinc.com> <20240426-dev-charlie-support_thead_vector_6_9-v4-7-b692f3c516ec@rivosinc.com> <20240501-probable-unfunded-746ef6ae1853@spud> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240501-probable-unfunded-746ef6ae1853@spud> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_124819_473992_7BE79AC0 X-CRM114-Status: GOOD ( 23.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 01, 2024 at 12:37:14PM +0100, Conor Dooley wrote: > On Fri, Apr 26, 2024 at 02:29:21PM -0700, Charlie Jenkins wrote: > > The __riscv_has_extension_likely() and __riscv_has_extension_unlikely() > > functions from the vendor_extensions.h can be used to simplify the > > standard extension checking code as well. Migrate those functions to > > cpufeature.h and reorganize the code in the file to use the functions. > > > > Signed-off-by: Charlie Jenkins > > --- > > arch/riscv/include/asm/cpufeature.h | 78 +++++++++++++++++------------- > > arch/riscv/include/asm/vendor_extensions.h | 28 ----------- > > 2 files changed, 44 insertions(+), 62 deletions(-) > > > > diff --git a/arch/riscv/include/asm/cpufeature.h b/arch/riscv/include/asm/cpufeature.h > > index fedd479ccfd1..17896ec9ec11 100644 > > --- a/arch/riscv/include/asm/cpufeature.h > > +++ b/arch/riscv/include/asm/cpufeature.h > > @@ -98,59 +98,66 @@ extern bool riscv_isa_fallback; > > > > unsigned long riscv_isa_extension_base(const unsigned long *isa_bitmap); > > > > +#define EXT_ALL_VENDORS 0 > > It's not really "all vendors", it's standard. Otherwise, this seems all This hooks up into the alternatives: ALTERNATIVE("nop", "j %l[l_yes]", %[vendor], %[ext], 1) Where the "vendor" argument is supposed to be 0 if the alternative is applicable to all vendors. Is there a better way to convey this? - Charlie > grand to me, > Reviewed-by: Conor Dooley > > Cheers, > Conor. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel