Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4277044pxb; Tue, 25 Jan 2022 07:11:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7v4r43WRUaz+0aGvzMEIJiclRvYyiUFW0bCSmZSGvUpy3+pEpXVtBRNHCNsRNcFjuAKUv X-Received: by 2002:a05:6402:392:: with SMTP id o18mr9711948edv.229.1643123505802; Tue, 25 Jan 2022 07:11:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643123505; cv=none; d=google.com; s=arc-20160816; b=c3QJYCew5OWSm7idgDfpFTfrf8n11igdJMLL8bVWkA0nADPZgO5R8C0ov0LrUgNkgD 1gC77oDekyqDnMoQEzBbjDUca7Ai96NVvnvdHtJDTSRH2uScBmjKqOaq6qGny7JtzH2P ylK+2jDNY8DMfWgKtIbPpxjfpXR/bJWkIa1F/laaY/fxt/2gtCFPwDlBuY4oRCRq61Hi JEyR/E9YIcfpaWhev2YfTDqChOSFSM943S+bixkCUjwQEIMn6qfOHACKDlWqnRrGJPfV qbtQ+F0c7sqli3PBhrVFi0jFQYEJJ4Nf0SWTcN8B190Oe1+vTcO40LetBkxlvybkHju+ qokg== 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=oRI65VzTweR6mF/JfEsd/zDBi/e63yawaGEHv4bGOA0=; b=sm9Tb23NaYeHI8LVqor/eAH3r9Tu4eD1+NOfEejWQpOENnQcUOlpoO6UK51x7lPtHV zJuOiryHpkq0Q8nvePK6CHRS4PLAnkmmphIO7n2TSBQP2SI7rM3bJ2HFBWZ65GJSO10h wQbN00FELmmJ2D8ovwcVxNDkbRzFCPzf7IVwBbWAx59/FJee0ynxbf1OBYGw4Y2d1Wio o95NwZFeNaSs3Rsuh2NLrnN764m/bJWrOU9WsCS3R4nqWuWsTa/Zw1lqlDPD9Isy+9xu r2RGAKifQyOmgro+lvL4Ht3SCGVwrJRlgVFL62lfPeLN5SqwYaMjnSBN+1dc4ZmWMwRA KX8A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ne27si8074943ejc.592.2022.01.25.07.11.17; Tue, 25 Jan 2022 07:11:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355487AbiAYLfC (ORCPT + 99 others); Tue, 25 Jan 2022 06:35:02 -0500 Received: from foss.arm.com ([217.140.110.172]:36796 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345725AbiAYLcN (ORCPT ); Tue, 25 Jan 2022 06:32:13 -0500 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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