Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2837007pxp; Tue, 8 Mar 2022 02:54:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlHgEV4pI4MfZI7i6w/2uED7f4Q7sEM8qVK+MlktSaO0h1Tw63r9KwbEKjTM6DfNdyyPA0 X-Received: by 2002:a17:906:80d2:b0:6db:40bf:892c with SMTP id a18-20020a17090680d200b006db40bf892cmr4790497ejx.726.1646736859803; Tue, 08 Mar 2022 02:54:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646736859; cv=none; d=google.com; s=arc-20160816; b=WXA0oQUQ2/UhhJYJvZB28S0GR0X+hk0+dDxVWeWHvoyLA1kAmfrlvlwhsRHRMwrCaH SvxFRlkNRiEbsnwzFJm8dXzVkgJdCyfzs4mMxK410Cfno37G5U9a6zOXe2lUAMoAJAwg oV8TW/COqwuBsp0GWKESvTYrjfWtkTlEsYBSRF7IHivSksgh4DXheGcJQBlHYmG3sd5h Jd9V3yImMKqZKNgeBZRMleI4aDictnNYC56LheTNCQkVGmMDhDkV5WCjoKkfb3xIC+Xe zWaUNNcl+MFoVUaXyJDVfJ752P5iM6bPxYKHheprwsdDuj2Fcqw2aVqjXLr/qogmJtHE 3zFA== 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=fmRNy2FZCuFnngDbUZPbW6nY1W/hG5t3UmoItKDBiOo=; b=N6YUaFoVfyYCEX0+lsM/dgH/omeyyCgEDO9e+shprE6CnRloZvHvbYUoi6xd0X9+wx o15cc3QQc3QMghUhUUfrr8BpfrcyKtvw+sOwhXkXi6is76lUzC3NtQch9Kuw60aSmDHu aOYtZSSAE99ot/GF5JBsMkKCXpo2QFNSnSQ1T4jMpO1laHf+f+SYJnzQ1atLyQFEDAE6 42n4wJkbImMr/BdM1XtoGJQFY/WEYErSHgbC/qWFPTWoO0LPWkKfH+drPlb8SVD6fcD1 DB+znNF8XDog+ujA/yC/Uk/vMZI3Jr/lJ7jWyHLQ3d31SjVeOzNuKFycgKuOtsbTly18 oBkQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 16-20020a508e10000000b00410b29c614esi11313938edw.365.2022.03.08.02.53.56; Tue, 08 Mar 2022 02:54:19 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245413AbiCGUy1 (ORCPT + 99 others); Mon, 7 Mar 2022 15:54:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245364AbiCGUyS (ORCPT ); Mon, 7 Mar 2022 15:54:18 -0500 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACCD827B25 for ; Mon, 7 Mar 2022 12:53:21 -0800 (PST) Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nRKM3-0002DJ-0A; Mon, 07 Mar 2022 21:53:19 +0100 From: Heiko Stuebner To: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, wefu@redhat.com, liush@allwinnertech.com, guoren@kernel.org, atishp@atishpatra.org, anup@brainfault.org, drew@beagleboard.org, hch@lst.de, arnd@arndb.de, wens@csie.org, maxime@cerno.tech, gfavor@ventanamicro.com, andrea.mondelli@huawei.com, behrensj@mit.edu, xinhaoqu@huawei.com, mick@ics.forth.gr, allen.baum@esperantotech.com, jscheid@ventanamicro.com, rtrauben@gmail.com, samuel@sholland.org, cmuellner@linux.com, philipp.tomsich@vrull.eu, Heiko Stuebner Subject: [PATCH v7 06/13] riscv: extend concatenated alternatives-lines to the same length Date: Mon, 7 Mar 2022 21:53:03 +0100 Message-Id: <20220307205310.1905628-7-heiko@sntech.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220307205310.1905628-1-heiko@sntech.de> References: <20220307205310.1905628-1-heiko@sntech.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_NONE, T_SCC_BODY_TEXT_LINE,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 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 --- arch/riscv/include/asm/alternative-macros.h | 30 ++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/riscv/include/asm/alternative-macros.h b/arch/riscv/include/asm/alternative-macros.h index baf649293288..c0fb11fad631 100644 --- a/arch/riscv/include/asm/alternative-macros.h +++ b/arch/riscv/include/asm/alternative-macros.h @@ -56,14 +56,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") \ @@ -77,21 +77,21 @@ ".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) \ +#define _ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, CONFIG_k) \ __ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, IS_ENABLED(CONFIG_k)) #define __ALTERNATIVE_CFG_2(old_c, new_c_1, vendor_id_1, errata_id_1, enable_1, \ new_c_2, vendor_id_2, errata_id_2, enable_2) \ - "886 :\n" \ - old_c "\n" \ - "887 :\n" \ - ALT_NEW_CONTENT(vendor_id_1, errata_id_1, enable_1, new_c_1) \ + "886 :\n" \ + old_c "\n" \ + "887 :\n" \ + ALT_NEW_CONTENT(vendor_id_1, errata_id_1, enable_1, new_c_1) \ ALT_NEW_CONTENT(vendor_id_2, errata_id_2, enable_2, new_c_2) #define _ALTERNATIVE_CFG_2(old_c, new_c_1, vendor_id_1, errata_id_1, CONFIG_k_1, \ -- 2.30.2