Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754906AbdCTMeX (ORCPT ); Mon, 20 Mar 2017 08:34:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:55009 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754776AbdCTMce (ORCPT ); Mon, 20 Mar 2017 08:32:34 -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 Subject: [PATCH v2 05/10] x86: kernel+lib, annotate local functions Date: Mon, 20 Mar 2017 13:32:17 +0100 Message-Id: <20170320123222.15453-5-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: 3032 Lines: 109 Use the newly added SYM_FUNC_START_LOCAL to annotate starts of all functions which do not have ".globl" annotation. This is needed to balance SYM_FUNC_END for tools that are about to generate debuginfo. In this patch, do it for local verify_cpu, early_idt_handler_common, and bad_*_user properly. Note that early_idt_handler_common already had ENDPROC -- switch to the new SYM_FUNC_END. Signed-off-by: Jiri Slaby Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: --- arch/x86/kernel/head_64.S | 4 ++-- arch/x86/kernel/verify_cpu.S | 3 ++- arch/x86/lib/getuser.S | 8 ++++---- arch/x86/lib/putuser.S | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index e093a804f1fb..90616ba150eb 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -355,7 +355,7 @@ ENTRY(early_idt_handler_array) .endr ENDPROC(early_idt_handler_array) -early_idt_handler_common: +SYM_FUNC_START_LOCAL(early_idt_handler_common) /* * The stack is the hardware frame, an error code or zero, and the * vector number. @@ -396,7 +396,7 @@ early_idt_handler_common: 20: decl early_recursion_flag(%rip) jmp restore_regs_and_iret -ENDPROC(early_idt_handler_common) +SYM_FUNC_END(early_idt_handler_common) __INITDATA diff --git a/arch/x86/kernel/verify_cpu.S b/arch/x86/kernel/verify_cpu.S index 014ea59aa153..fd60f1ac5fec 100644 --- a/arch/x86/kernel/verify_cpu.S +++ b/arch/x86/kernel/verify_cpu.S @@ -33,7 +33,7 @@ #include #include -verify_cpu: +SYM_FUNC_START_LOCAL(verify_cpu) pushf # Save caller passed flags push $0 # Kill any dangerous flags popf @@ -139,3 +139,4 @@ verify_cpu: popf # Restore caller passed flags xorl %eax, %eax ret +SYM_FUNC_END(verify_cpu) diff --git a/arch/x86/lib/getuser.S b/arch/x86/lib/getuser.S index 37b62d412148..29f0707a3913 100644 --- a/arch/x86/lib/getuser.S +++ b/arch/x86/lib/getuser.S @@ -104,21 +104,21 @@ ENDPROC(__get_user_8) EXPORT_SYMBOL(__get_user_8) -bad_get_user: +SYM_FUNC_START_LOCAL(bad_get_user) xor %edx,%edx mov $(-EFAULT),%_ASM_AX ASM_CLAC ret -END(bad_get_user) +SYM_FUNC_END(bad_get_user) #ifdef CONFIG_X86_32 -bad_get_user_8: +SYM_FUNC_START_LOCAL(bad_get_user_8) xor %edx,%edx xor %ecx,%ecx mov $(-EFAULT),%_ASM_AX ASM_CLAC ret -END(bad_get_user_8) +SYM_FUNC_END(bad_get_user_8) #endif _ASM_EXTABLE(1b,bad_get_user) diff --git a/arch/x86/lib/putuser.S b/arch/x86/lib/putuser.S index cd5d716d2897..d77883f36875 100644 --- a/arch/x86/lib/putuser.S +++ b/arch/x86/lib/putuser.S @@ -88,10 +88,10 @@ ENTRY(__put_user_8) ENDPROC(__put_user_8) EXPORT_SYMBOL(__put_user_8) -bad_put_user: +SYM_FUNC_START_LOCAL(bad_put_user) movl $-EFAULT,%eax EXIT -END(bad_put_user) +SYM_FUNC_END(bad_put_user) _ASM_EXTABLE(1b,bad_put_user) _ASM_EXTABLE(2b,bad_put_user) -- 2.12.0