Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp194400lqo; Thu, 16 May 2024 03:41:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX30xSip2YqFZVDEF6QeSErjYb83Q0T2et5Y7AQ9Mn6lfy1xSTp06ioDI8BoX4vk3fqJmNl5QRHMs660gDbmN/hXKDza07AfLQQTPZXgw== X-Google-Smtp-Source: AGHT+IGSCt+dKrULVdQpVYTk5MlCOuMG/AY9bAzLJyGvWgmUM2GEeEYExmMoinTiKUW1fVFmSfcl X-Received: by 2002:a17:90a:7789:b0:2a5:f70c:9ec6 with SMTP id 98e67ed59e1d1-2b6cc97d18fmr16532546a91.24.1715856073323; Thu, 16 May 2024 03:41:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715856073; cv=pass; d=google.com; s=arc-20160816; b=vWYIgVvPj9XSLTypZV8V/fjbCg0XlKNSolZfgA43Ts0Rdo1ovfL9U81g2CfmMUE+jw sY6bLk3sxM+f8bcXdA3I+iNgqc7GBS8mIjYhMsihDQDrRjSg1/O/N1UO5Ipc8i1IANrR 8l3DKdrvaxrsBbCWpdOP/LtKIj6YcnTWLjXMiQ77LcuqtC262SaERw38Vl2SDGKA60i6 pI/oSBY4+rp6z4DcnMfqcjPLZoNjDvpbQNs7QHXQTVbpt711gIoh0qzojdv6YS1JXW0S GZQ6+3EJanLronhXdhVOMW5fKEzWpEczvz+OlWvlkxvMBFVFVKOj2CIjWRbKBahknmwm /lFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:references:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=BfiCrmzMav6jtyX7fjtUp23BCUfl5Tu6+xTotiNhCKs=; fh=z9NQhNB/Km9AqJT5RNJ1+0jI1aciPecNqqpBDQw8HMM=; b=jY7zciBNye5rprGbgjSoi1c5W4A6YiccPQrx9r4IhytcYB08Zc9kGYMcO8ahTlaxfo Kj/pcVfhL0TLqduhGNgbOJPVqBnvwESGqYw/5TlwBrtAydDyYuJo9N8AbxXVIo3F2aZb ntcxjdd4p6i05VgUbJZMSiTGpYuyVqYHVolrhZCpOIEFcAW9ILhzAx+F2ZaVX5S+N/tD EsQvQg73b61sljnwqaCQqgOCuYR0Shle3YjfimC1DXPr3B6LfzzS63gKrc8p197cxocF ripjSZXY9xtuYzL8xa8znRdDFq8S1/PX8fdiSGtf78pfFKZj577XtUufMGsZ5DvUTCf/ /4yg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ijeQdZ88; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-180908-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180908-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628a5b91fsi17551195a91.40.2024.05.16.03.41.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 03:41:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180908-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ijeQdZ88; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-180908-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180908-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C166FB226CC for ; Thu, 16 May 2024 10:29:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BBD7143C43; Thu, 16 May 2024 10:29:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="ijeQdZ88" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 B0BF8143866 for ; Thu, 16 May 2024 10:29:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715855353; cv=none; b=E+FcxGKKFDji7CdBX0FI/U0ICCiaV4HMPI8PXAXPBT0e9+jTcirkw3hlASHWnUCfDk60Mqd/c52Um8oahGW6XI7OQOBvf5F+cfVPacomL+paA3DPEW4NpiBbWahqqLDdsYi4nrRTfviyjyG61vP/I/7hkjcP/4W4XRh9ypeqiL4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715855353; c=relaxed/simple; bh=B50V4b8tuqE4j58BDda6kbJDZFnCUVds2QKqgis/B04=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=sbG4vYzBvMG5CLQzjvZb6U2txP+Vj1VjRNQIaW31rbC+nMR0LemH2N8D7H0m4gvxmBBpw4xkyT7/kZYjpIIZ7JugFuGoIQq+Q/5/zmF10lw4vETi4i3vsxKdzpNMtb7y5GZl/g/PiIHtNUjzNWRWfwkONyR8BmJtST9sl8RANnk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=ijeQdZ88; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a5a5c930cf6so276577466b.0 for ; Thu, 16 May 2024 03:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1715855350; x=1716460150; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=BfiCrmzMav6jtyX7fjtUp23BCUfl5Tu6+xTotiNhCKs=; b=ijeQdZ88l/sSJaHC7unZ71hrNNL81O/80pbgWEuICD9TI4Nw6hX7dVuOw1MQcdcACJ B5yI6P3kgpBYqjC90vMJ2C3lZeJL2N/NFk6pzlpm+qSMMVwZtFGIjcFGMWSnX4gba3XW 52TojMG/3M1iOwulxA2BewPCzDkZV3a0S6tuBnLVN2Qg9GTG6LCOCdiG6VRCaKEDwZnq xMD/wBev96KVBQBc8KrExCGsLwVH/Aibp1dPYaTmf2KHwgfMbjZkkaExkdRY6CmD+kKD foClWtqRUBPGVQ7NcYaPk0Lwf7G4FoPems2lzUqAqqL7cDtZhMsN5zE7VuP9nKyT0Luf uF7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715855350; x=1716460150; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BfiCrmzMav6jtyX7fjtUp23BCUfl5Tu6+xTotiNhCKs=; b=QXXmhAAjvmXCO85iZqb9EYXOia31NILbUVGoy02BpSUW3j1LTG4RiGgVL4fRWP15YO iKdXbS5Bpfk2WzjkHTD5gSTIliE2MERSkcpu5MRuYDIW0OU9JZhbiD21BTkxg+hf9Okv 6p9+RI0gcUeMngrMlsvjCVrvbe0Z5WvbZmQTZlv0tbR1dn/ioX0OtkHOzylwHyZUbatr gwKXwxrNd815LH3XJxQbXAc1HZkYndoDb2cdsPUpMkH4Q8xRxgho/l+XRQGT/wYeob07 CzdsTMt4xLjX7/u0pU+0Cc0Y0K1+Tt3EksiVwMRa9HWcJxtE5V3w275q4iXvJHDmMVYy 9/JQ== X-Forwarded-Encrypted: i=1; AJvYcCXKkImMckvJrwsztvzGCEx3vnnP5KYzzFwIxwuNwOxairUic6zOY27rsBsUonWD2OL7wLTokPl+QjML3wkcD68dG9q5XRRutWitVJo9 X-Gm-Message-State: AOJu0YyZKOAUQ1taBDx7gCBXSitK9DLtKTtZ8KbWwNG0qseNsgpZcE4B BY8LpSyOf5Y4PtEbZB+5hfGxwyy0fatq/OqrOK9xDjTUcsGKGSzOXvtqHW+u+OQ= X-Received: by 2002:a17:906:f898:b0:a5a:8ca4:6781 with SMTP id a640c23a62f3a-a5a8ca468bbmr456970666b.51.1715855349956; Thu, 16 May 2024 03:29:09 -0700 (PDT) Received: from ?IPv6:::1? ([2a00:11b1:1012:4c5c:60c0:dbec:5b5e:a393]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42012a025dbsm166085975e9.23.2024.05.16.03.29.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 May 2024 03:29:09 -0700 (PDT) Date: Thu, 16 May 2024 12:29:08 +0200 From: Andrew Jones To: Conor Dooley CC: Conor Dooley , linux-riscv@lists.infradead.org, xiao.w.wang@intel.com, pulehui@huawei.com, Charlie Jenkins , Paul Walmsley , Palmer Dabbelt , linux-kernel@vger.kernel.org Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_v1=5D_RISC-V=3A_separate_Zbb_optimisatio?= =?US-ASCII?Q?ns_requiring_and_not_requiring_toolchain_support?= In-Reply-To: <20240516-speller-target-d453ad060486@wendy> References: <20240515-hedging-passage-44fd394ab1be@spud> <20240516-7ff4001c9f2edd2a61775244@orel> <20240516-speller-target-d453ad060486@wendy> Message-ID: <60EFC387-B19B-46A6-AD1B-D6DAC8108836@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On May 16, 2024 10:59:44 AM GMT+02:00, Conor Dooley wrote: >On Thu, May 16, 2024 at 09:59:44AM +0200, Andrew Jones wrote: >> On Wed, May 15, 2024 at 04:27:40PM GMT, Conor Dooley wrote: >>=20 >> So the new hidden config is a shorthand for >>=20 >> #if defined(CONFIG_RISCV_ISA_ZBB) && \ >> defined(CONFIG_TOOLCHAIN_HAS_ZBB) && \ >> defined(CONFIG_RISCV_ALTERNATIVE) >>=20 >> which is reasonable to add, since that's a mouthful, but I'm not sure t= he >> name, RISCV_ISA_ZBB_ALT, does a good job conveying all that=2E >>=20 >> If we instead just dropped the 'depends on TOOLCHAIN_HAS_ZBB' from >> config RISCV_ISA_ZBB (keeping the 'depends on RISCV_ALTERNATIVE', >> since nobody is really complaining about that), then we could change >> this to >>=20 >> #if defined(CONFIG_RISCV_ISA_ZBB) && defined(CONFIG_TOOLCHAIN_HAS_ZBB) > >Yeah, I think this is a cleaner solution=2E > >> > asm goto(ALTERNATIVE("j %l[legacy]", "nop", 0, >> > RISCV_ISA_EXT_ZBB, 1) >> > : : : : legacy); >> > diff --git a/arch/riscv/include/asm/bitops=2Eh b/arch/riscv/include/a= sm/bitops=2Eh >> > index 880606b0469a=2E=2E3ed810a6123d 100644 >> > --- a/arch/riscv/include/asm/bitops=2Eh >> > +++ b/arch/riscv/include/asm/bitops=2Eh >> > @@ -15,7 +15,7 @@ >> > #include >> > #include >> > =20 >> > -#if !defined(CONFIG_RISCV_ISA_ZBB) || defined(NO_ALTERNATIVE) >> > +#if !defined(CONFIG_RISCV_ISA_ZBB_ALT) || defined(NO_ALTERNATIVE) >>=20 >> nit: It's sufficient to check !defined(CONFIG_RISCV_ISA_ZBB), so no nee= d >> for this change or its #endif comment change below=2E > >Are you sure? I did test leaving this as-was and it broke the build for >llvm-14=2E Oops, sorry=2E I didn't look at the full context=2E You were right=2E Thanks, drew > >Cheers, >Conor=2E