Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754818AbdCTMfr (ORCPT ); Mon, 20 Mar 2017 08:35:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:54977 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754663AbdCTMc2 (ORCPT ); Mon, 20 Mar 2017 08:32:28 -0400 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 v2 02/10] x86: assembly, FUNC_START for fn, DATA_START for data Date: Mon, 20 Mar 2017 13:32:14 +0100 Message-Id: <20170320123222.15453-2-jslaby@suse.cz> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170320123222.15453-1-jslaby@suse.cz> References: <9ea5e137-61f9-dccc-bb9d-ac3ff86e5867@suse.cz> <20170320123222.15453-1-jslaby@suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3254 Lines: 96 This is a start of series to cleanup macros used for starting functions, data, globals etc. across x86. When we have all this sorted out, this will help to inject DWARF unwinding info by objtool later. The goal is forcing SYM_FUNC_START to emit .cfi_startproc and SYM_FUNC_END to emit .cfi_endproc. Automatically at best. This particular patch makes proper use of SYM_DATA_START on data and SYM_FUNC_START 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 Reviewed-by: Juergen Gross [xen parts] Cc: Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Pavel Machek Cc: --- arch/x86/entry/entry_64_compat.S | 3 +-- arch/x86/kernel/acpi/wakeup_64.S | 14 +++++++------- arch/x86/kernel/head_64.S | 2 +- arch/x86/kernel/mcount_64.S | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S index e1721dafbcb1..73d7ff0b125c 100644 --- a/arch/x86/entry/entry_64_compat.S +++ b/arch/x86/entry/entry_64_compat.S @@ -342,8 +342,7 @@ ENTRY(entry_INT80_compat) jmp restore_regs_and_iret END(entry_INT80_compat) - ALIGN -GLOBAL(stub32_clone) +SYM_FUNC_START(stub32_clone) /* * The 32-bit clone ABI is: clone(..., int tls_val, int *child_tidptr). * The 64-bit clone ABI is: clone(..., int *child_tidptr, int tls_val). diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S index 50b8ed0317a3..0b5a5573f57d 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 +SYM_DATA_START(saved_rbp) .quad 0 +SYM_DATA_START(saved_rsi) .quad 0 +SYM_DATA_START(saved_rdi) .quad 0 +SYM_DATA_START(saved_rbx) .quad 0 -ENTRY(saved_rip) .quad 0 -ENTRY(saved_rsp) .quad 0 +SYM_DATA_START(saved_rip) .quad 0 +SYM_DATA_START(saved_rsp) .quad 0 -ENTRY(saved_magic) .quad 0 +SYM_DATA_START(saved_magic) .quad 0 diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index ac9d327d2e42..e093a804f1fb 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -487,7 +487,7 @@ early_gdt_descr: early_gdt_descr_base: .quad INIT_PER_CPU_VAR(gdt_page) -ENTRY(phys_base) +SYM_DATA_START(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 7b0d3da52fb4..2b4d7045e823 100644 --- a/arch/x86/kernel/mcount_64.S +++ b/arch/x86/kernel/mcount_64.S @@ -320,7 +320,7 @@ ENTRY(ftrace_graph_caller) retq END(ftrace_graph_caller) -GLOBAL(return_to_handler) +SYM_FUNC_START(return_to_handler) subq $24, %rsp /* Save the return values */ -- 2.12.0