Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1407475pxb; Fri, 21 Jan 2022 17:57:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgwQ7+cHZZFNV6v/s+pBpE+5x7DPBN2q8W2fWOhibzEss9if2GqSRAYU682obBTtogz53N X-Received: by 2002:a05:6a00:244f:b0:4c4:3915:2d70 with SMTP id d15-20020a056a00244f00b004c439152d70mr5756256pfj.44.1642816673545; Fri, 21 Jan 2022 17:57:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642816673; cv=none; d=google.com; s=arc-20160816; b=RwENWagPkx/hUdFdglZFhYealloD4hAMxUczP//ItY8kD5TlRHxN8Vk/K88LoQbbo2 GsKjT+bKMVrD5JDSsl8ESQInu7UatkDrRscMe8DMQRLTk7DqR3MFDW3fupWFfyqejSRK BzbQS/i4Ot9eDRyFEtVOviZmXMCdoLlXsmYzYbkGeZBXsBC2XgesptXFO4uH/T4RZSvG X+F2wLOxBFvenXbjXuiIQMdDTHIJ5P+vhlJ8j2IcOH+/bj+orZGAOT63BgyBWFcKa41Y /bbiZQEfvJ255ZfCkdn4wK+xvIhMMkgW3MDT55JSGvIRChXtcxk+nlcg3MqWa9xekRF/ 2lFg== 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=iqTqnf8Qm8DLTWBmSUGAnw80jN1dDjtKXxYHkMaB007bjHOEv9vT7Ifn7iyFhfgKwn GCESSdP9dbiUMVNKIYexAdPDyBoaeykwzTlIzx9wkyyXZgJk6oY1nYcs73vvpNYMamEh 0BgmmqxyDB6pKFGhFXvabarHGUyZfb6ZSD0hiGsT+kYHx/B4hSlylIcAzj+3bxggVcI4 X5TXUYHCnjBPc14Itfs9WVOm3nQ8stb7Ynv3tcfXQ0zFjWnAJtCKVTJzVNGoCpNUflI2 hucT9mUtbRpr1TlG3yYuJ6BB/tMompgJwjKOTLE/hD1qlF7PtHVGL7OmXjLn1MG70AQB +dzg== 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 ij25si6895497plb.514.2022.01.21.17.57.41; Fri, 21 Jan 2022 17:57:53 -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 S1351519AbiAUQhX (ORCPT + 99 others); Fri, 21 Jan 2022 11:37:23 -0500 Received: from gloria.sntech.de ([185.11.138.130]:35278 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349317AbiAUQhF (ORCPT ); Fri, 21 Jan 2022 11:37:05 -0500 Received: from p508fcef5.dip0.t-ipconnect.de ([80.143.206.245] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAwuK-0008GA-RW; Fri, 21 Jan 2022 17:37:00 +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, dlustig@nvidia.com, 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 v5 06/14] riscv: extend concatenated alternatives-lines to the same length Date: Fri, 21 Jan 2022 17:36:10 +0100 Message-Id: <20220121163618.351934-7-heiko@sntech.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220121163618.351934-1-heiko@sntech.de> References: <20220121163618.351934-1-heiko@sntech.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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