From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161275AbdDUORH (ORCPT ); Fri, 21 Apr 2017 10:17:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:56129 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1040481AbdDUONV (ORCPT ); Fri, 21 Apr 2017 10:13:21 -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 v3 29/29] x86: assembly, replace WEAK uses Date: Fri, 21 Apr 2017 16:13:05 +0200 Message-Id: <20170421141305.25180-29-jslaby@suse.cz> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170421141305.25180-1-jslaby@suse.cz> References: <20170421141305.25180-1-jslaby@suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the new SYM_FUNC_INNER_LABEL for WEAK entries in the middle of x86 assembly functions. And make sure WEAK is not defined for X86. Signed-off-by: Jiri Slaby Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org --- arch/x86/kernel/ftrace_32.S | 2 +- arch/x86/kernel/ftrace_64.S | 2 +- arch/x86/kernel/head_32.S | 4 ++-- include/linux/linkage.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/ftrace_32.S b/arch/x86/kernel/ftrace_32.S index 9c3db18b2a19..8ec22538edb9 100644 --- a/arch/x86/kernel/ftrace_32.S +++ b/arch/x86/kernel/ftrace_32.S @@ -96,7 +96,7 @@ ftrace_graph_call: #endif /* This is weak to keep gas from relaxing the jumps */ -WEAK(ftrace_stub) +SYM_FUNC_INNER_LABEL(ftrace_stub, SYM_V_WEAK) ret SYM_FUNC_END(ftrace_caller) diff --git a/arch/x86/kernel/ftrace_64.S b/arch/x86/kernel/ftrace_64.S index 0970d85693c4..a6dc744d069f 100644 --- a/arch/x86/kernel/ftrace_64.S +++ b/arch/x86/kernel/ftrace_64.S @@ -181,7 +181,7 @@ SYM_FUNC_INNER_LABEL(ftrace_graph_call, SYM_V_GLOBAL) #endif /* This is weak to keep gas from relaxing the jumps */ -WEAK(ftrace_stub) +SYM_FUNC_INNER_LABEL(ftrace_stub, SYM_V_WEAK) retq SYM_FUNC_END(ftrace_caller) diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 74d18d2fef5a..ce976f1e7a0b 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -155,8 +155,8 @@ SYM_FUNC_START(startup_32) jmp *%eax .Lbad_subarch: -WEAK(lguest_entry) -WEAK(xen_entry) +SYM_FUNC_INNER_LABEL(lguest_entry, SYM_V_WEAK) +SYM_FUNC_INNER_LABEL(xen_entry, SYM_V_WEAK) /* Unknown implementation; there's really nothing we can do at this point. */ ud2a diff --git a/include/linux/linkage.h b/include/linux/linkage.h index b0b6b315cd95..9f4d06f04784 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -108,13 +108,13 @@ #endif /* CONFIG_X86 */ #endif /* LINKER_SCRIPT */ +#ifndef CONFIG_X86 #ifndef WEAK /* deprecated, use SYM_FUNC_START_WEAK */ #define WEAK(name) \ SYM_FUNC_START_WEAK(name) #endif -#ifndef CONFIG_X86 #ifndef END /* deprecated, use SYM_FUNC_END, SYM_DATA_END, or SYM_END */ #define END(name) \ -- 2.12.2