From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 38DE5C433EF for ; Tue, 25 Jan 2022 11:33:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KeDhoHKpA9CTSomzdQ8Z3Fk6UMagSxFClcAm0EZKuCM=; b=Y3b/bZwSqMTfHK YIuTvpij3SDq5/PtyPqqKI5yDfFDKuKSVFH5Qth5x/gh6yxrb4ysKlLpVrr7jdfqATlRFkKhZjYvu 7zGT0HNBEvmpabymnKcLGGm4jCoggQO0FEYJS169/biE5xSpksOLKxrLX1GB5nNxiybDt7F5V5fS2 mbgJ91N0Wk6WVFKgLn6EZBNZuKzqhPsXzDABkD2YvQk+8MQnRO/6+wXV5D/v51+cTuQYpAMaZqcg/ bhp6iluGfvYU0kM09uDKBk3CwD/xvpriBINQizzxJRtPdDCBBmKcedQ7bjgu0f6lj8hgi6aVFIEN8 6mdIp5ORIvRpoZkE4vUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCK3r-007dRa-O9; Tue, 25 Jan 2022 11:32:31 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCK3Z-007dKp-Fa for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 11:32:14 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C57B7101E; Tue, 25 Jan 2022 03:32:11 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C93CF3F7D8; Tue, 25 Jan 2022 03:32:09 -0800 (PST) From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: acme@redhat.com, ardb@kernel.org, bp@alien8.de, broonie@kernel.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, jpoimboe@redhat.com, jslaby@suse.cz, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, mark.rutland@arm.com, mingo@redhat.com, peterz@infradead.org, tglx@linutronix.de, will@kernel.org Subject: [PATCH v2 1/7] arm: lib: remove leading whitespace in bitop macro Date: Tue, 25 Jan 2022 11:31:54 +0000 Message-Id: <20220125113200.3829108-2-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220125113200.3829108-1-mark.rutland@arm.com> References: <20220125113200.3829108-1-mark.rutland@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_033213_638602_EF411B9E X-CRM114-Status: GOOD ( 12.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The `bitop` macro is used to create assembly functions for bit operations, handling all the boilderplate such as ENTRY(), ENDPROC(), etc. Within the `bitop` macro, the argument to ENTRY() has leading whitespace for alignment, but there is no leading whitespace for the argument to ENDPROC(). The leading whitespace in the argument to ENTRY() prevents the value from safely being token-pasted to form a longer symbol name, as subsequent patches will need to do, where the value will be passed into a new SYM_ENTRY_AT() macro: ENTRY(name) -> SYM_FUNC_START(name) -> SYM_START(name, [...]) -> SYM_START_AT(name, [...]) -> SYM_ENTRY_AT(name, [...]) ... where SYM_ENTRY_AT() will token-paste name to form a local label used by later macros: | .set .L____sym_entry__##name, location ASM_NL ... but as this happens before assembler macros are evaluated, and `name` will expand to `\name`, the token-pasting will retain the leading space: | .L____sym_entry__ \name ... and when evaluated within an assembler macro this will result in build errors: | [mark@lakrids:~/src/linux]% git clean -qfdx | [mark@lakrids:~/src/linux]% usekorg 10.3.0 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -s multi_v7_defconfig | [mark@lakrids:~/src/linux]% usekorg 10.3.0 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -s arch/arm/lib | arch/arm/lib/changebit.S: Assembler messages: | arch/arm/lib/changebit.S:12: Error: expected comma after ".L____sym_entry__" | make[1]: *** [scripts/Makefile.build:388: arch/arm/lib/changebit.o] Error 1 | make: *** [Makefile:1846: arch/arm/lib] Error 2 This patch removes the leading space such that the name can be token-pasted. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Russell King Cc: Will Deacon --- arch/arm/lib/bitops.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h index 95bd359912889..36195edeb0b9f 100644 --- a/arch/arm/lib/bitops.h +++ b/arch/arm/lib/bitops.h @@ -4,7 +4,7 @@ #if __LINUX_ARM_ARCH__ >= 6 .macro bitop, name, instr -ENTRY( \name ) +ENTRY(\name ) UNWIND( .fnstart ) ands ip, r1, #3 strbne r1, [ip] @ assert word-aligned @@ -29,7 +29,7 @@ ENDPROC(\name ) .endm .macro testop, name, instr, store -ENTRY( \name ) +ENTRY(\name ) UNWIND( .fnstart ) ands ip, r1, #3 strbne r1, [ip] @ assert word-aligned @@ -59,7 +59,7 @@ ENDPROC(\name ) .endm #else .macro bitop, name, instr -ENTRY( \name ) +ENTRY(\name ) UNWIND( .fnstart ) ands ip, r1, #3 strbne r1, [ip] @ assert word-aligned @@ -86,7 +86,7 @@ ENDPROC(\name ) * to avoid dirtying the data cache. */ .macro testop, name, instr, store -ENTRY( \name ) +ENTRY(\name ) UNWIND( .fnstart ) ands ip, r1, #3 strbne r1, [ip] @ assert word-aligned -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel