All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: mingo@redhat.com
Cc: Juergen Gross <jgross@suse.com>, Len Brown <len.brown@intel.com>,
	hpa@zytor.com, linux-pm@vger.kernel.org, x86@kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-kernel@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
	jpoimboe@redhat.com, xen-devel@lists.xenproject.org,
	tglx@linutronix.de, Jiri Slaby <jslaby@suse.cz>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data
Date: Fri, 17 Feb 2017 11:47:48 +0100	[thread overview]
Message-ID: <20170217104757.28588-1-jslaby__27358.6498959505$1487328545$gmane$org@suse.cz> (raw)

This is a start of series to unify use of ENTRY, ENDPROC, GLOBAL, END,
and other macros across x86. When we have all this sorted out, this will
help to inject DWARF unwinding info by objtool later.

So, let us use the macros this way:
* ENTRY -- start of a global function
* ENDPROC -- end of a local/global function
* GLOBAL -- start of a globally visible data symbol
* END -- end of local/global data symbol

The goal is forcing ENTRY to emit .cfi_startproc and ENDPROC to emit
.cfi_endproc.

This particular patch makes proper use of GLOBAL on data and ENTRY on a
function which was not the case on 4 locations.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <x86@kernel.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: <xen-devel@lists.xenproject.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: <linux-pm@vger.kernel.org>
---
 arch/x86/kernel/acpi/wakeup_64.S | 14 +++++++-------
 arch/x86/kernel/head_64.S        |  2 +-
 arch/x86/kernel/mcount_64.S      |  2 +-
 arch/x86/xen/xen-head.S          |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S
index 50b8ed0317a3..bfd0ddefa5e8 100644
--- a/arch/x86/kernel/acpi/wakeup_64.S
+++ b/arch/x86/kernel/acpi/wakeup_64.S
@@ -125,12 +125,12 @@ ENTRY(do_suspend_lowlevel)
 ENDPROC(do_suspend_lowlevel)
 
 .data
-ENTRY(saved_rbp)	.quad	0
-ENTRY(saved_rsi)	.quad	0
-ENTRY(saved_rdi)	.quad	0
-ENTRY(saved_rbx)	.quad	0
+GLOBAL(saved_rbp)	.quad	0
+GLOBAL(saved_rsi)	.quad	0
+GLOBAL(saved_rdi)	.quad	0
+GLOBAL(saved_rbx)	.quad	0
 
-ENTRY(saved_rip)	.quad	0
-ENTRY(saved_rsp)	.quad	0
+GLOBAL(saved_rip)	.quad	0
+GLOBAL(saved_rsp)	.quad	0
 
-ENTRY(saved_magic)	.quad	0
+GLOBAL(saved_magic)	.quad	0
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index b467b14b03eb..7c14ab3a0f3b 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -489,7 +489,7 @@ early_gdt_descr:
 early_gdt_descr_base:
 	.quad	INIT_PER_CPU_VAR(gdt_page)
 
-ENTRY(phys_base)
+GLOBAL(phys_base)
 	/* This must match the first entry in level2_kernel_pgt */
 	.quad   0x0000000000000000
 EXPORT_SYMBOL(phys_base)
diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
index b50b283f90e4..3e35675e201e 100644
--- a/arch/x86/kernel/mcount_64.S
+++ b/arch/x86/kernel/mcount_64.S
@@ -314,7 +314,7 @@ ENTRY(ftrace_graph_caller)
 	retq
 END(ftrace_graph_caller)
 
-GLOBAL(return_to_handler)
+ENTRY(return_to_handler)
 	subq  $24, %rsp
 
 	/* Save the return values */
diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
index 37794e42b67d..39ea5484763a 100644
--- a/arch/x86/xen/xen-head.S
+++ b/arch/x86/xen/xen-head.S
@@ -37,7 +37,7 @@ ENTRY(startup_xen)
 
 .pushsection .text
 	.balign PAGE_SIZE
-ENTRY(hypercall_page)
+GLOBAL(hypercall_page)
 	.skip PAGE_SIZE
 
 #define HYPERCALL(n) \
-- 
2.11.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

             reply	other threads:[~2017-02-17 10:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 10:47 Jiri Slaby [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-02-17 10:47 [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Jiri Slaby
2017-02-17 11:06 ` Juergen Gross
2017-02-17 11:06 ` Juergen Gross
2017-03-01  9:38 ` Ingo Molnar
2017-03-01  9:38   ` Ingo Molnar
2017-03-01  9:50   ` Jiri Slaby
2017-03-01  9:50     ` Jiri Slaby
2017-03-01 10:09   ` Thomas Gleixner
2017-03-01 10:09   ` Thomas Gleixner
2017-03-01 10:27     ` Ingo Molnar
2017-03-01 10:27       ` Ingo Molnar
2017-03-03 12:22       ` Jiri Slaby
2017-03-03 12:22         ` Jiri Slaby
2017-03-03 18:20       ` hpa
2017-03-03 18:20         ` hpa
2017-03-06 14:09         ` Jiri Slaby
2017-03-06 14:09           ` Jiri Slaby
2017-03-07  7:57         ` Ingo Molnar
2017-03-07  7:57           ` Ingo Molnar
2017-03-03 18:24       ` hpa
2017-03-03 18:24         ` hpa
2017-03-07  8:27         ` Ingo Molnar
2017-03-07  8:27           ` Ingo Molnar

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='20170217104757.28588-1-jslaby__27358.6498959505$1487328545$gmane$org@suse.cz' \
    --to=jslaby@suse.cz \
    --cc=boris.ostrovsky@oracle.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=jpoimboe@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.