From patchwork Fri Feb 17 10:47:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 9579593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C8F9B600F6 for ; Fri, 17 Feb 2017 10:48:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9B7A2866B for ; Fri, 17 Feb 2017 10:48:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABA8428675; Fri, 17 Feb 2017 10:48:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C5412866B for ; Fri, 17 Feb 2017 10:48:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755755AbdBQKsD (ORCPT ); Fri, 17 Feb 2017 05:48:03 -0500 Received: from mx2.suse.de ([195.135.220.15]:44816 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755428AbdBQKsC (ORCPT ); Fri, 17 Feb 2017 05:48:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D982EAAB2; Fri, 17 Feb 2017 10:47:59 +0000 (UTC) From: Jiri Slaby To: mingo@redhat.com Cc: tglx@linutronix.de, hpa@zytor.com, x86@kernel.org, jpoimboe@redhat.com, linux-kernel@vger.kernel.org, Jiri Slaby , Boris Ostrovsky , Juergen Gross , xen-devel@lists.xenproject.org, "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org Subject: [PATCH 01/10] x86: assembly, ENTRY for fn, GLOBAL for data Date: Fri, 17 Feb 2017 11:47:48 +0100 Message-Id: <20170217104757.28588-1-jslaby@suse.cz> X-Mailer: git-send-email 2.11.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Pavel Machek Cc: Reviewed-by: Juergen Gross --- 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) \