From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 9CF03147C74 for ; Wed, 1 May 2024 20:39:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714595965; cv=none; b=QpSTjXho1u9zD4O3K+BnChvktBeRDa1wdAcM7T5+wcDL/BXKNTG09OgnfI0UUr70VpQCn+azkc1PvqcoVbmS3zrdIg2aBNtVqfVAhhMjizINoYVc5M7bANdcMl70KtCmfkv+t8+i6skm/bo3F3QIDgzgXLh1pYd7UibittZ9bkY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714595965; c=relaxed/simple; bh=2GwCqwpwUIKYGDSmrRTVo6q9dQy7rbyy3/yglpIabsw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=diK1TvzT2Tpfh0KwiA3r7JyMlWPgGlBVxVNoWphIdfEmM1mo44FflkyGnRB7MdiJpSnxzekUHQjqBWL/VPcJFpZpnAiP21H2lv36mE5ZWSpShfzdvocQwuFbM3iLF3NiB5YFWGmp/HwMarAJ3BLi1SitE3jHtiM94ucGdRRea1Y= 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=1k+HxI3L; arc=none smtp.client-ip=209.85.210.174 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="1k+HxI3L" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-6f074520c8cso6856611b3a.0 for ; Wed, 01 May 2024 13:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714595963; x=1715200763; 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=AKSbKmCdqNYp/TkwU1C8PV1OsGdgS8t0tRM69B6F3C8=; b=1k+HxI3LYeEeCx0TrCDMtB6bNLA4aUDy2MM0w2Sqovz0iFf1plgNpqThgzXbQJ3gJX 2tUO6CliziAf94ZAHDK5iTJkCOjv0l7IIn+FKS+o6xcUPeug3k3sSeMszkeNxV8MbjVD s1VzYdSfL1X5K8blvTS0XGPQso/eYwjJ6THlUkizhclk9cSkYtXdKgdExTSLp7elJmL4 bIbnteKkjBCVyVsoI7b7lQ+3f8aKA25T/uQiZug32ZkVK8gRLsFBI04wc6ll6HjRwmHz LVF1rn2wrWMHMyPZCoMvlfYNy42bHrjL5k+eSH6PGybMAxLV+3CfhpsWV/VloYc4TtEP ovaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714595963; x=1715200763; 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=AKSbKmCdqNYp/TkwU1C8PV1OsGdgS8t0tRM69B6F3C8=; b=Y9Aa6Adgdzvf6o/3hMWjNd9Hc4ngG9mWHGB/noh92BLoLDmVW1Esl4L54OROVU9dRn x2f/IeJsCZ4v1+bF1iNlJ4ZiBx3Lv6zM8qUFtWOgi5DLkk60pK/fwzoA/S/OCRbC/U65 wbgOEFe9OpkIwryn1wRA+iswwNZbs+zNKRBsLcm12HZz3Cb2UfzPHUzRzi+/MjEVu5jT VfBRIQAsSLxTzfOY+G7kvYMu1o6QSnIWtt4MC4YVUmQdLxD0OWdwRfuLKFmxe57jgC/S fUTPhAFnsfLOgaZCigeuwfyGrDP7bDRDylqnXmIH7iZFt6an3EOpdpPdY9wg7FYn/v/7 /QDg== X-Forwarded-Encrypted: i=1; AJvYcCXSIwE87w5F7B0YU8cdH0s43/tcyNKPdzYJJCvYB4gTxXnul/j5Eefey3zRpJL/wCXS3t5ygAZwwuzxja++pFP12wVPkspdDSql X-Gm-Message-State: AOJu0Yxazuwarh7Qr8sT9ZL/TaRTlrilrkBKc/q6G/T6p01efua+MIED bLR7fYf1f2uvQSop2++s9+X8Gk4RTnA2B2j/dh8ZJxjvHGVkeYxqpUVtbc5BSl4= X-Google-Smtp-Source: AGHT+IHt+rl59slOy1iEvfvZBlyLdzZV/krFCrpw2Eo+5Hs2TZHpo6k/cWFEA5ZGhA3qB1CbXECo4g== X-Received: by 2002:a05:6a20:5617:b0:1af:36df:5159 with SMTP id ir23-20020a056a20561700b001af36df5159mr18100pzc.59.1714595962795; Wed, 01 May 2024 13:39:22 -0700 (PDT) Received: from ghost ([2601:647:5700:6860:1dcc:e03e:dc61:895d]) by smtp.gmail.com with ESMTPSA id v22-20020aa78516000000b006f03a06314esm23032553pfn.195.2024.05.01.13.39.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 13:39:22 -0700 (PDT) Date: Wed, 1 May 2024 13:39:20 -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> <20240501-hazy-reformist-8ff36ba53450@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-hazy-reformist-8ff36ba53450@spud> On Wed, May 01, 2024 at 09:15:44PM +0100, Conor Dooley wrote: > On Wed, May 01, 2024 at 12:48:13PM -0700, Charlie Jenkins wrote: > > 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) > > Yeah, I know what you're using it for, I just find the naming odd. > > > > 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? > > s/EXT_ALL_VENDORS/STANDARD_EXT/? Sure :) - Charlie 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 E56D2C4345F for ; Wed, 1 May 2024 20:39:34 +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=N2UACV5rwW7iwTRNs12F+DjyUShp+mIYyDuO+akE2j0=; b=jy9DnTpQwnVgCQ T6Z8eOgE1fyFATpL8eK9us2kjv7vxSaZhitZPBMlR5RZhPoRR4RgERzczI+BAqIDs7XvejFPJlIFR L3BuECG36yKfTdextuhE/0ulbpn1iktrHp0hUy+fXrOFsCxGMF52WSj4tEPmXsX7q5L7BYgrEZs+d 7rpqxWrrQk8m+lq+qMMj5Ae4vOhQgpIwFKGRUPMDX3ajsONP8waFi7febVwvLdqjG7GfEbDjqu3pM 4Dgd6uzyaYP0AboQWsnsPPBzvJdB+F8o2hHWO72bNfc62npz/ECuAVRseyMsYDFUuFTyWQHxmR1dd jcC3IHIvPdStM+//AP3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2Gjf-0000000AevM-251T; Wed, 01 May 2024 20:39:27 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2Gjc-0000000Aeuh-0ZGm for linux-riscv@lists.infradead.org; Wed, 01 May 2024 20:39:25 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6effe9c852eso6420533b3a.3 for ; Wed, 01 May 2024 13:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714595963; x=1715200763; 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=AKSbKmCdqNYp/TkwU1C8PV1OsGdgS8t0tRM69B6F3C8=; b=oMkkPVgW0ANOp4AgzuPUiEhOReV8kfKnu5AFEPvyIghqtQMmkMkGefBBxiFd6NJmQc dpi5OZLoeB4pQjnIhmrhK+Yh/C4/L5yQO1jupk8Uir5jT4LkWiJKBsTQQdainz+SRfHN PATkmmiudiLKXDCGaP10HihaO/AY3GYa2tSIR0VE5eHeGvZ73d2z6DqKnwOU3dFijqQx kQNkNcqCfP+t7mnIPbUVCShq+XxH0OIMR8j/puXS1IA55jHzvJayyVxcH9nTNU2nDOCY rHOoffFwGRrFVo4VvuuN1xmyUkKK0laJpnTkV7KbbjTza5HWQmbp29G/DXUouKMO0pou Vr7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714595963; x=1715200763; 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=AKSbKmCdqNYp/TkwU1C8PV1OsGdgS8t0tRM69B6F3C8=; b=ZhHuIduBZFog1Wb0qq9q5kW7+Ap7FTkJ1ccCkxJxUR29tuvnuN3QRmII2SbliRckqC GRTgFhHNddCBCEYeJA9suQdDYs87d2uHET2zlgbQAzi9ub4DFsDWE+xYAfscLCeBPsNS 6myLGMVE0sn19itWmPDoUPrAATf1TPT+D6i9Wa4ObTnqd06phQgAp2JpgIW3lwmlCbtg J4hXvttkO1iEtZq957LDG1tkZEJMf7KtBLfkNKohNWQ950ZBklMzjp/fC6BJHQUYWPDW rpoJiGuLwo/tA/9r46qgJGgl0Rz0gCnGNZwcmWN0Wr0qwNc6vtqIfn1WNRyK56HGKM6r fHQw== X-Forwarded-Encrypted: i=1; AJvYcCU/xtTJg/5JwqFWQmTKBuPKp5gYDqJMCpefKY8H+Ixx5ZrpFuZbA9DdwWzkc4jG4ZO7JgEchgSmuG3QFgK4jq8FgqniDhiuFYjq17BE69Lo X-Gm-Message-State: AOJu0YxI43L7u38fzacxX/zPO7diCPNXlOFr26/DhodP1JWQTDAhTEyE +BMtFvN10u5jHT1BDwzQGV/QOFDeU0IEUFtZypAqr48KMQWXKMx6KtlDgi/bFUcnGWcTlGnnNLs t X-Google-Smtp-Source: AGHT+IHt+rl59slOy1iEvfvZBlyLdzZV/krFCrpw2Eo+5Hs2TZHpo6k/cWFEA5ZGhA3qB1CbXECo4g== X-Received: by 2002:a05:6a20:5617:b0:1af:36df:5159 with SMTP id ir23-20020a056a20561700b001af36df5159mr18100pzc.59.1714595962795; Wed, 01 May 2024 13:39:22 -0700 (PDT) Received: from ghost ([2601:647:5700:6860:1dcc:e03e:dc61:895d]) by smtp.gmail.com with ESMTPSA id v22-20020aa78516000000b006f03a06314esm23032553pfn.195.2024.05.01.13.39.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 13:39:22 -0700 (PDT) Date: Wed, 1 May 2024 13:39:20 -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> <20240501-hazy-reformist-8ff36ba53450@spud> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240501-hazy-reformist-8ff36ba53450@spud> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_133924_318897_7FFB3F6A X-CRM114-Status: GOOD ( 26.97 ) 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 09:15:44PM +0100, Conor Dooley wrote: > On Wed, May 01, 2024 at 12:48:13PM -0700, Charlie Jenkins wrote: > > 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) > > Yeah, I know what you're using it for, I just find the naming odd. > > > > 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? > > s/EXT_ALL_VENDORS/STANDARD_EXT/? Sure :) - Charlie _______________________________________________ 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 1412FC4345F for ; Wed, 1 May 2024 20:39:40 +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=TYSNEolhvH3X73bTv4ZgATEiTgbzvndn80wLwcYUtJQ=; b=ds0zEnqKZZxSEB JyNSnVxc1ZR/CQSccUIG8i35sY+zGbUhWLskM1bWXQkH+aFtLMcApp8f9gipPt3LDjApkTk7N+W1w PjBklWvlNaomftsQzz8OI9VDs8lkUtLtydwTpq+S7JqEA7pabLmq/9hN4XX+y6SLomjboBsjV3t3X tkjcMdMKV+7MthUO+x+Zrv9vxf5roXXlrLIr8X75etHevvEKe+CoChAd9Vh7v5S3x5FY4QvNgaH+6 KHxV72Hs6xbZ2IeRYQrTwmd4tN3zZU1Vgg8ztu4wBil9RFARwYz+7TDaa3BNUTbIqHBi+ASONf62N +unY3ZDFqIPk3CIEtGgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2Gjh-0000000AevX-0iP9; Wed, 01 May 2024 20:39:29 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2Gjd-0000000Aeui-1Pn2 for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 20:39:27 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6ed9fc77bbfso5735552b3a.1 for ; Wed, 01 May 2024 13:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714595963; x=1715200763; 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=AKSbKmCdqNYp/TkwU1C8PV1OsGdgS8t0tRM69B6F3C8=; b=oMkkPVgW0ANOp4AgzuPUiEhOReV8kfKnu5AFEPvyIghqtQMmkMkGefBBxiFd6NJmQc dpi5OZLoeB4pQjnIhmrhK+Yh/C4/L5yQO1jupk8Uir5jT4LkWiJKBsTQQdainz+SRfHN PATkmmiudiLKXDCGaP10HihaO/AY3GYa2tSIR0VE5eHeGvZ73d2z6DqKnwOU3dFijqQx kQNkNcqCfP+t7mnIPbUVCShq+XxH0OIMR8j/puXS1IA55jHzvJayyVxcH9nTNU2nDOCY rHOoffFwGRrFVo4VvuuN1xmyUkKK0laJpnTkV7KbbjTza5HWQmbp29G/DXUouKMO0pou Vr7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714595963; x=1715200763; 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=AKSbKmCdqNYp/TkwU1C8PV1OsGdgS8t0tRM69B6F3C8=; b=sw0hesi7S2iNArIpJepDggI2+KASwYOu/U2zXPSFCSAN6g16xovHBbFEsGk8Sjkr8F Aks18aF4XHI3s5nquXdTRmTnhl1p5o8Ze+3LThOWnG85883ehC3o5yzP3uhSgksX5GHs oFa1aJFQFeKpI1Auy2ohHPJnk17oxDrtG2NjyIfLSCeofdKdGuZDY7ssRShXP7QiQHOS ZwQ5sLGDgoPZ0FryeusO9aWqwxT/sQAJDe7NRiMIZSp+Y5DQp3SBAxN0+qj7YX6tWig+ 1or+qhH+QEAxdyFmUc/km7QZS07BI9N4nJVFMAaeBws5aX4UQUjLj/Hw+qXlM0vYZHx8 YOuw== X-Forwarded-Encrypted: i=1; AJvYcCXf3C3yHETxxpu1KMkh5qSRw+puYsOzGYX4so8eR/8ei8RvkKP8Id05eTg/Icc200vKONUiyU4nelKSHpGlln+3Ico7wb3fNnK63V0YuFquxgNzNJI= X-Gm-Message-State: AOJu0Yw/oK0RmrGQQ5+9ldcakrQhLDv+ggOy+wIJopR+fl4yIVGaiEpH Yhiv6RgJwp3Squ2QAiiGJ0UTUCHu9qGuP3Oh24OVOqmBMxWriLWendi1dfUqB48= X-Google-Smtp-Source: AGHT+IHt+rl59slOy1iEvfvZBlyLdzZV/krFCrpw2Eo+5Hs2TZHpo6k/cWFEA5ZGhA3qB1CbXECo4g== X-Received: by 2002:a05:6a20:5617:b0:1af:36df:5159 with SMTP id ir23-20020a056a20561700b001af36df5159mr18100pzc.59.1714595962795; Wed, 01 May 2024 13:39:22 -0700 (PDT) Received: from ghost ([2601:647:5700:6860:1dcc:e03e:dc61:895d]) by smtp.gmail.com with ESMTPSA id v22-20020aa78516000000b006f03a06314esm23032553pfn.195.2024.05.01.13.39.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 13:39:22 -0700 (PDT) Date: Wed, 1 May 2024 13:39:20 -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> <20240501-hazy-reformist-8ff36ba53450@spud> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240501-hazy-reformist-8ff36ba53450@spud> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_133925_385045_FD196405 X-CRM114-Status: GOOD ( 28.52 ) 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 09:15:44PM +0100, Conor Dooley wrote: > On Wed, May 01, 2024 at 12:48:13PM -0700, Charlie Jenkins wrote: > > 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) > > Yeah, I know what you're using it for, I just find the naming odd. > > > > 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? > > s/EXT_ALL_VENDORS/STANDARD_EXT/? Sure :) - Charlie _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel