Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2605602iob; Mon, 16 May 2022 01:55:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDRoG0fLJeEqqOVphnWHAlufMZYMSChuUYOEH2ybiVO+D++D1pZoW3D4Q6YYi77+MAbkfU X-Received: by 2002:a05:600c:4e0e:b0:394:8a94:98a5 with SMTP id b14-20020a05600c4e0e00b003948a9498a5mr15512413wmq.124.1652691312724; Mon, 16 May 2022 01:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652691312; cv=none; d=google.com; s=arc-20160816; b=UMrr6IrQy0d45wjXppqCIUfcozw/qPufRYFqKyE28bf2YeyyZOgkl3N0CdrGyUxyyG sJha28IY8tUatbxd9eQElKzivfUvgf8HnoTg3bk0ngZox+WaNUjkDnJihR2hLjqjsWuw OK1r6O6IQx59Ps2qLr6/UTBghFETRwZpI22c5cQ2HwjrVX4ULaL/OUi5wkoyyydLoaiG GutI5yvKu7RKc/lXsab0xiWeIi54bLbZ760qxlsS78cS/fnVYh6PtUOmLhV2rn4g9Yvg vChucXHi9IrBzxtO+D8Q0UqNKhxHkcBCg0ScgFN0+I8Jq11I9yBPkvIFh6ewaNmO6scK Pz2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LJj256mvDuJC/xLmj66EcO81aOXKuk7TPpEyXndClBY=; b=wdFM1gjt58En/A3yS4fTf6h+uMU6bhgdpC59S90bzGW0FY/b5+9F/E18qibDG1JeIK ipyVZhJPf7JHR+pTTnHbsos6PXoBbVw+eLGNTSU0VJhQz7lyZyQAaXMpyE/b86pN2O18 GCzmU3QHYF3HdS3earBfy79NXJzwtbtHJ569cIqekJSFSamTFNrnFz1NPmbZ3KstmiI7 x8kinSgg/E1QDjbhKjXJWwTVD3S3cb09Eb8z9Q23bYCMr9CJC/EHLGjHclPkfGWBo3Zi hUzuP3MEwp9xPZGN1aQz+bvLH2N+ZxtBxVyG/kO0qRB77r0P+4Yk2ry+Jg7Umr9FZyDI 8Pvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QBcl4ClJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a05600018ab00b0020cf2a8aeecsi10609450wri.379.2022.05.16.01.54.46; Mon, 16 May 2022 01:55:12 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QBcl4ClJ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240572AbiEPGzU (ORCPT + 99 others); Mon, 16 May 2022 02:55:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240573AbiEPGzQ (ORCPT ); Mon, 16 May 2022 02:55:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FE88366B1 for ; Sun, 15 May 2022 23:55:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E71B9B80B55 for ; Mon, 16 May 2022 06:55:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2AEAC341C5 for ; Mon, 16 May 2022 06:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652684112; bh=wiA8FGI75YrhJytAH6LfccFoNYeTu2gqXP2d9q68wmE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QBcl4ClJ6DSsqgG12TPkgIFLpZdex++xIZWM/ijBVeyIPLm7SFadVpGwPs6jFVfwS f+K1Qe3VdyFNR+1ajdzAmUmUJ3rhTV67Wk16lBjlTGu/ichk+GFD3Yv48lDvDT0ncD dewzk5kehdxZa3Gk9WEB0NIwks73bRUkPSArzey4aW/ZM/MHqlGwQcJHNPq3JBTEEh edMNohwGZeiaynqVgSqz30fjAb5VYdtOP3jw8XONk9XiAWr0A/yxBgfRbB7TrHMhxf hy6SVauBONMj33MHJtv8NIHf2+GKhZZKWi6myEWcQAgNkN3m6x+m5CbwG9H/nEwxvX uh6eKoA4os53Q== Received: by mail-vs1-f49.google.com with SMTP id w124so14521096vsb.8 for ; Sun, 15 May 2022 23:55:12 -0700 (PDT) X-Gm-Message-State: AOAM530B/LbICDBnmVD1C/xMwZF+r51mK/oO0B5zuWeQRaWIPzjU9nMN HKEO659+++19tKySACWJ2NLfwg6/BwCX1dhIrzo= X-Received: by 2002:a05:6102:390b:b0:32d:5fc3:bd2c with SMTP id e11-20020a056102390b00b0032d5fc3bd2cmr5079622vsu.51.1652684111598; Sun, 15 May 2022 23:55:11 -0700 (PDT) MIME-Version: 1.0 References: <20220511192921.2223629-1-heiko@sntech.de> <20220511192921.2223629-6-heiko@sntech.de> In-Reply-To: <20220511192921.2223629-6-heiko@sntech.de> From: Guo Ren Date: Mon, 16 May 2022 14:55:00 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 05/12] riscv: extend concatenated alternatives-lines to the same length To: Heiko Stuebner Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , linux-riscv , Linux Kernel Mailing List , Wei Fu , liush , Atish Patra , Anup Patel , Drew Fustini , Christoph Hellwig , Arnd Bergmann , Chen-Yu Tsai , Maxime Ripard , Greg Favor , Andrea Mondelli , Jonathan Behrens , "Xinhaoqu (Freddie)" , Nick Kossifidis , Allen Baum , Josh Scheid , Richard Trauben , Samuel Holland , Christoph Muellner , Philipp Tomsich Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Reviewed-by: Guo Ren On Thu, May 12, 2022 at 3:29 AM Heiko Stuebner wrote: > > ALT_NEW_CONTENT already uses same-length assembler lines, so > extend this to the other elements as well. > > This makes it more readable when these elements need to be extended > in the future. > > Signed-off-by: Heiko Stuebner > Reviewed-by: Philipp Tomsich > --- > arch/riscv/include/asm/alternative-macros.h | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/arch/riscv/include/asm/alternative-macros.h b/arch/riscv/include/asm/alternative-macros.h > index 9e04cd53afc8..8c2bbc7bbe50 100644 > --- a/arch/riscv/include/asm/alternative-macros.h > +++ b/arch/riscv/include/asm/alternative-macros.h > @@ -62,14 +62,14 @@ > #include > #include > > -#define ALT_ENTRY(oldptr, newptr, vendor_id, errata_id, newlen) \ > - RISCV_PTR " " oldptr "\n" \ > - RISCV_PTR " " newptr "\n" \ > - REG_ASM " " vendor_id "\n" \ > - REG_ASM " " newlen "\n" \ > +#define ALT_ENTRY(oldptr, newptr, vendor_id, errata_id, newlen) \ > + RISCV_PTR " " oldptr "\n" \ > + RISCV_PTR " " newptr "\n" \ > + REG_ASM " " vendor_id "\n" \ > + REG_ASM " " newlen "\n" \ > ".word " errata_id "\n" > > -#define ALT_NEW_CONTENT(vendor_id, errata_id, enable, new_c) \ > +#define ALT_NEW_CONTENT(vendor_id, errata_id, enable, new_c) \ > ".if " __stringify(enable) " == 1\n" \ > ".pushsection .alternative, \"a\"\n" \ > ALT_ENTRY("886b", "888f", __stringify(vendor_id), __stringify(errata_id), "889f - 888f") \ > @@ -83,10 +83,10 @@ > ".org . - (889b - 888b) + (887b - 886b)\n" \ > ".endif\n" > > -#define __ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, enable) \ > - "886 :\n" \ > - old_c "\n" \ > - "887 :\n" \ > +#define __ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, enable) \ > + "886 :\n" \ > + old_c "\n" \ > + "887 :\n" \ > ALT_NEW_CONTENT(vendor_id, errata_id, enable, new_c) > > #define _ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, CONFIG_k) \ > -- > 2.35.1 > -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/