Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1979259pxb; Wed, 9 Feb 2022 08:27:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQS+gIXhN+ziZqZ3+/PsYtrk2N/Yf1Ukg2HabYVuWGXclALuJY6RtUK8lE0n5edUrl/uYs X-Received: by 2002:a17:90a:764b:: with SMTP id s11mr4253359pjl.77.1644424019985; Wed, 09 Feb 2022 08:26:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644424019; cv=none; d=google.com; s=arc-20160816; b=LAclRbKr1iIUHvhv8mGOWZXn9lMBRdkMSuZJgY0qOo3LDDE0868jXxQV7+VOFs2wXA 6QWkMk0Czs0zVyNcyXCxJWqssJUQvLNvS3Lhpec0wSG0ikETseYq7kexJ2/R7SrlNNY3 gcI85SfA1xG5jzCTX0KwlIRd6iIC34xKPjKLq0q34U3N7dKJqwwiG3qMYfjVoRY54k7B zrUMdbY8mI1dMymFHvAYU9kk10TS+TXRTlaLv+ol8R7vJYdbkYia/fEWYEB5yYGh8Urw yPOS0Ds6WFA9h71vBH+7x8No4QXS9dinsOnk9/k9Oq0adoRvBOOMm+kdS77IA8uewxI9 D28Q== 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=F9dqEmsV9Ibt1sSNc/V5u2a5mbiLUqkQw9D2qKjMQaJGXQzc9pw8bjFz5bKsrGHsKu fsFe5v8XHIKYy9axCwWA9JLA/8y9/Jyd2WKpgQQjeceTy4+DfzTPvH9AYcCSSMBaZMvB OprpJ7jn3as8nkPBEuBd9FC6fRvZ3NcY3G2StLS4BTN0zCL4T8sDVqnTsyuPIKzIrftg qTJkqP55Y375B7XISx27rRZW/2CCqgHidjrDRmTd8Bw3xo7SWNUpbWl2z5qSh20LLqMk ++MVyz9kTkUug7B0jeUsKB/iwfuKQGXdz1EmoH3bJMzqr1kKLCtE6J0Q+9gdU/s0UOBL OaDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay10si10987518plb.62.2022.02.09.08.26.42; Wed, 09 Feb 2022 08:26:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233450AbiBIMij (ORCPT + 99 others); Wed, 9 Feb 2022 07:38:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233363AbiBIMi1 (ORCPT ); Wed, 9 Feb 2022 07:38:27 -0500 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA529C05CB9A; Wed, 9 Feb 2022 04:38:27 -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 1nHmEo-0001Mv-88; Wed, 09 Feb 2022 13:38:22 +0100 From: Heiko Stuebner To: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@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, huffman@cadence.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 v6 06/14] riscv: extend concatenated alternatives-lines to the same length Date: Wed, 9 Feb 2022 13:37:52 +0100 Message-Id: <20220209123800.269774-7-heiko@sntech.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220209123800.269774-1-heiko@sntech.de> References: <20220209123800.269774-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