Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp10409749rwb; Fri, 25 Nov 2022 04:29:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf5HgIkI7HFhn0Yip+bt6QBptBw20+0OZ7K6BCseMHP1OTfhNyPDBiVqbUvZbbT75+bZZ4BB X-Received: by 2002:a05:6402:344e:b0:46a:9539:16f9 with SMTP id l14-20020a056402344e00b0046a953916f9mr5810463edc.240.1669379346723; Fri, 25 Nov 2022 04:29:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669379346; cv=none; d=google.com; s=arc-20160816; b=DryPodZm8DD/bwyFJYzeliiu7+RO9jwi4yat13ClGE0RClYTmV4jFp4q3vzzbX6tZf 1S5+ToPIlUqKNm93LJrlYp0yLgCIbugV+hObJCWHkWonBphpSYRM1DrbnhXIkpet3pUr AT9Pp7xLhfuXV1U6poHwPMqefcmOxsyJJfKocMmsXXk5hugKuR9VYcH9LvwS+sgjBEDx woP81WsMZcpSWawLgK8ibSPpcW6EgG5Ra0p3S7ZSmxc7EUDEAN+yKHSSrlAZmQMfbc5h 6SURnhb5K7YGSrA3FPR6BRpIiJRcGYcNKKzxtzUWFC+eDOXsYIKzvRvM7b6mgoI7AhTW kUuA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Fe+ycnufp4hdfkSBp2q2r8+pNB8C64y0fwLDHMedQ5s=; b=H5oz8yZ65Z8m+BNyABddkjEhz9F7f3um7pNP/DhsTO79VYmqc0QDLfCGJmQBvYDnpw OZSR07tusAHHCovtqHSEwcXrV2aoTp2KA9yc6cbUg+7oD6kP4O6DJQufj8V8AZzs9oKX YVeyfZ8RLkGu5xmxec58yvAmXz3/v93/Y8jFAjiCkFxrGsKI7ln6vKRZ5QHX1MLucCCC oOafzFkycAqyqyBSt5++kyA2FHeOzB0SQ7xUEltuomBbGf32/idiVg7YillBd40s7xLw q89MEa0l8QasmIQji3iKpAkGO5maJAbLQPyS8vM4/a1xWEQFpc9jB0Z8p/ZB1DUEjB4z Jp9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd39-20020a17090762a700b0078dce2b1985si3300854ejc.134.2022.11.25.04.28.40; Fri, 25 Nov 2022 04:29:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230050AbiKYKUY convert rfc822-to-8bit (ORCPT + 86 others); Fri, 25 Nov 2022 05:20:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbiKYKUW (ORCPT ); Fri, 25 Nov 2022 05:20:22 -0500 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1184A22B0D; Fri, 25 Nov 2022 02:20:18 -0800 (PST) Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oyVoT-0002Rt-7A; Fri, 25 Nov 2022 11:20:05 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: "Lad, Prabhakar" Cc: Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Geert Uytterhoeven , Magnus Damm , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Guo Ren , Jisheng Zhang , Atish Patra , Anup Patel , Andrew Jones , Nathan Chancellor , Philipp Tomsich , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Biju Das , Lad Prabhakar Subject: Re: [PATCH v4 1/7] riscv: asm: alternative-macros: Introduce ALTERNATIVE_3() macro Date: Fri, 25 Nov 2022 11:20:04 +0100 Message-ID: <3217756.bB369e8A3T@diego> In-Reply-To: References: <20221124172207.153718-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <4801607.MHq7AAxBmi@diego> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_SPF_HELO_TEMPERROR 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 Am Freitag, 25. November 2022, 11:02:21 CET schrieb Lad, Prabhakar: > Hi Heiko, > > On Thu, Nov 24, 2022 at 7:58 PM Heiko St?bner wrote: > > > > Am Donnerstag, 24. November 2022, 20:52:33 CET schrieb Conor Dooley: > > > On Thu, Nov 24, 2022 at 05:22:01PM +0000, Prabhakar wrote: > > > > From: Lad Prabhakar > > > > > > > > Introduce ALTERNATIVE_3() macro. > > > > > > Bit perfunctory I think! There's a lovely comment down below that would > > > make for a better commit message if you were to yoink it. > > > Content looks about what I'd expect to see though. > > > > Also both the comment on the original ALTERNATIVE_2 and the new ALTERNATIVE_3 > > should probably be merged into a single comment explaining this once for all > > ALTERNATIVE_x variants. > > > > Especially with the dma stuff, I'm pretty sure we'll get at least an ALTERNATIVE_4 > > if not even more ;-) . So we defnitly don't want to repeat this multiple times. > > > Do agree. How about the below? > > /* > * Similar to what ALTERNATIVE_2() macro does but with an additional > * vendor content. > */ > > So the other ALTERNATIVE_2+() macros will keep on building on it. My idea was more like having _one_ comment block of something like ----- /* * ALTERNATIVE_x macros allow providing multiple replacement options * for an ALTERNATIVE code section. This is helpful if multiple * implementation variants for the same functionality exist for * different cpu cores. * * Usage: * ALTERNATIVE_x(old_content, * new_content1, vendor_id1, errata_id1, CONFIG_k1, * new_content2, vendor_id2, errata_id2, CONFIG_k2, * ... * new_contentx, vendor_idx, errata_idx, CONFIG_kx) */ #define ALTERNATIVE_2(...) #define ALTERNATIVE_3(...) etc ----- So this would include dropping the old comment over ALTERNATIVE2 Heiko