From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755928AbbI2Hmb (ORCPT ); Tue, 29 Sep 2015 03:42:31 -0400 Received: from terminus.zytor.com ([198.137.202.10]:36926 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755499AbbI2HmV (ORCPT ); Tue, 29 Sep 2015 03:42:21 -0400 Date: Tue, 29 Sep 2015 00:39:36 -0700 From: tip-bot for Vitaly Kuznetsov Message-ID: Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, peterz@infradead.org, hpa@zytor.com, vkuznets@redhat.com, torvalds@linux-foundation.org, jim.epost@gmail.com, tglx@linutronix.de, stephen@networkplumber.org, kys@microsoft.com, gregkh@linuxfoundation.org, haiyangz@microsoft.com Reply-To: haiyangz@microsoft.com, stephen@networkplumber.org, kys@microsoft.com, gregkh@linuxfoundation.org, torvalds@linux-foundation.org, tglx@linutronix.de, jim.epost@gmail.com, vkuznets@redhat.com, mingo@kernel.org, peterz@infradead.org, hpa@zytor.com, linux-kernel@vger.kernel.org In-Reply-To: <1443002577-25370-1-git-send-email-vkuznets@redhat.com> References: <1443002577-25370-1-git-send-email-vkuznets@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case Git-Commit-ID: 7d381b749a010ccd48d5649c843cac0d14d1c229 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 7d381b749a010ccd48d5649c843cac0d14d1c229 Gitweb: http://git.kernel.org/tip/7d381b749a010ccd48d5649c843cac0d14d1c229 Author: Vitaly Kuznetsov AuthorDate: Wed, 23 Sep 2015 12:02:57 +0200 Committer: Ingo Molnar CommitDate: Tue, 29 Sep 2015 09:37:06 +0200 x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case Recent changes in the Hyper-V driver: b4370df2b1f5 ("Drivers: hv: vmbus: add special crash handler") broke the build when CONFIG_KEXEC_CORE is not set: arch/x86/built-in.o: In function `hv_machine_crash_shutdown': arch/x86/kernel/cpu/mshyperv.c:112: undefined reference to `native_machine_crash_shutdown' Decorate all kexec related code with #ifdef CONFIG_KEXEC_CORE. Reported-by: Jim Davis Reported-by: Stephen Hemminger Signed-off-by: Vitaly Kuznetsov Signed-off-by: Thomas Gleixner Cc: devel@linuxdriverproject.org Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Greg Kroah-Hartman Cc: Peter Zijlstra Cc: Linus Torvalds Link: http://lkml.kernel.org/r/1443002577-25370-1-git-send-email-vkuznets@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/mshyperv.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index 381c8b9..20e242e 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -34,11 +34,10 @@ struct ms_hyperv_info ms_hyperv; EXPORT_SYMBOL_GPL(ms_hyperv); -static void (*hv_kexec_handler)(void); -static void (*hv_crash_handler)(struct pt_regs *regs); - #if IS_ENABLED(CONFIG_HYPERV) static void (*vmbus_handler)(void); +static void (*hv_kexec_handler)(void); +static void (*hv_crash_handler)(struct pt_regs *regs); void hyperv_vector_handler(struct pt_regs *regs) { @@ -96,8 +95,8 @@ void hv_remove_crash_handler(void) hv_crash_handler = NULL; } EXPORT_SYMBOL_GPL(hv_remove_crash_handler); -#endif +#ifdef CONFIG_KEXEC_CORE static void hv_machine_shutdown(void) { if (kexec_in_progress && hv_kexec_handler) @@ -111,7 +110,8 @@ static void hv_machine_crash_shutdown(struct pt_regs *regs) hv_crash_handler(regs); native_machine_crash_shutdown(regs); } - +#endif /* CONFIG_KEXEC_CORE */ +#endif /* CONFIG_HYPERV */ static uint32_t __init ms_hyperv_platform(void) { @@ -186,8 +186,10 @@ static void __init ms_hyperv_init_platform(void) no_timer_check = 1; #endif +#if IS_ENABLED(CONFIG_HYPERV) && defined(CONFIG_KEXEC_CORE) machine_ops.shutdown = hv_machine_shutdown; machine_ops.crash_shutdown = hv_machine_crash_shutdown; +#endif mark_tsc_unstable("running on Hyper-V"); }