linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] linkage: add generic GLOBAL() macro
Date: Thu, 15 Nov 2018 22:41:58 +0000	[thread overview]
Message-ID: <20181115224203.24847-2-mark.rutland@arm.com> (raw)
In-Reply-To: <20181115224203.24847-1-mark.rutland@arm.com>

Declaring a global symbol in assembly is tedious, error-prone, and
painful to read. While ENTRY() exists, this is supposed to be used for
function entry points, and this affects alignment in a potentially
undesireable manner.

Instead, let's add a generic GLOBAL() macro for this, as x86 added
locally in commit:

  95695547a7db44b8 ("x86: asm linkage - introduce GLOBAL macro")

... thus allowing us to use this more freely in the kernel.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
---
 include/linux/linkage.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 7c47b1a471d4..7e020782ade2 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -79,6 +79,12 @@
 #define ALIGN __ALIGN
 #define ALIGN_STR __ALIGN_STR
 
+#ifndef GLOBAL
+#define GLOBAL(name) \
+	.globl name ASM_NL \
+	name:
+#endif
+
 #ifndef ENTRY
 #define ENTRY(name) \
 	.globl name ASM_NL \
-- 
2.11.0

  reply	other threads:[~2018-11-15 22:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 22:41 [PATCH 0/6] arm64: ftrace fixes/cleanup Mark Rutland
2018-11-15 22:41 ` Mark Rutland [this message]
2018-11-15 22:41 ` [PATCH 2/6] arm64: ftrace: use GLOBAL() Mark Rutland
2018-11-15 22:42 ` [PATCH 3/6] arm64: ftrace: enable graph FP test Mark Rutland
2018-11-15 22:42 ` [PATCH 4/6] arm64: ftrace: don't adjust the LR value Mark Rutland
2018-11-15 22:42 ` [PATCH 5/6] arm64: ftrace: remove return_regs macros Mark Rutland
2018-11-15 22:42 ` [PATCH 6/6] arm64: ftrace: always pass instrumented pc in x0 Mark Rutland
2018-11-30 13:29 ` [PATCH 0/6] arm64: ftrace fixes/cleanup Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181115224203.24847-2-mark.rutland@arm.com \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).