Currently with this configuration I get:

arch/x86/built-in.o: In function `hv_machine_crash_shutdown':
mshyperv.c:(.text+0x29656): undefined reference to 
`native_machine_crash_shutdown'

Fixes: b4370df2b1f5 ("Drivers: hv: vmbus: add special crash handler")
Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
Cc: Vitaly Kuznetsov <vkuzn...@redhat.com>
---
 arch/x86/kernel/cpu/mshyperv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 381c8b9..0c94600 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -35,7 +35,7 @@ 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);
+static void (*hv_crash_handler)(struct pt_regs *regs) __maybe_unused;
 
 #if IS_ENABLED(CONFIG_HYPERV)
 static void (*vmbus_handler)(void);
@@ -105,12 +105,14 @@ static void hv_machine_shutdown(void)
        native_machine_shutdown();
 }
 
+#ifdef CONFIG_KEXEC_CORE
 static void hv_machine_crash_shutdown(struct pt_regs *regs)
 {
        if (hv_crash_handler)
                hv_crash_handler(regs);
        native_machine_crash_shutdown(regs);
 }
+#endif
 
 
 static uint32_t  __init ms_hyperv_platform(void)
@@ -187,7 +189,9 @@ static void __init ms_hyperv_init_platform(void)
 #endif
 
        machine_ops.shutdown = hv_machine_shutdown;
+#ifdef CONFIG_KEXEC_CORE
        machine_ops.crash_shutdown = hv_machine_crash_shutdown;
+#endif
        mark_tsc_unstable("running on Hyper-V");
 }
 
-- 
Ben Hutchings
Any smoothly functioning technology is indistinguishable from a rigged demo.

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to