public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] x86: fix build in !CONFIG_KEXEC_CORE case
@ 2015-08-11 13:35 Vitaly Kuznetsov
  2015-08-17 17:58 ` KY Srinivasan
  0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Kuznetsov @ 2015-08-11 13:35 UTC (permalink / raw)
  To: x86
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-kernel,
	Greg KH, K. Y. Srinivasan, Jim Davis, linux-next

Recent changes in Hyper-V driver ("Drivers: hv: vmbus: add special crash
handler") broke the build when CONFIG_KEXEC_CORE is not set. These
changes, however, only reveal the previously existent issue: when
CONFIG_KEXEC_CORE is not defined kernel/kexec.c is not being included in
the build and native_machine_crash_shutdown() defined in asm/reboot.h has
no implementation.

Reported-by: Jim Davis <jim.epost@gmail•com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat•com>
---
 arch/x86/include/asm/reboot.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h
index a82c4f1..a6c1124 100644
--- a/arch/x86/include/asm/reboot.h
+++ b/arch/x86/include/asm/reboot.h
@@ -16,8 +16,15 @@ struct machine_ops {
 
 extern struct machine_ops machine_ops;
 
-void native_machine_crash_shutdown(struct pt_regs *regs);
 void native_machine_shutdown(void);
+#ifdef CONFIG_KEXEC_CORE
+void native_machine_crash_shutdown(struct pt_regs *regs);
+#else
+static inline void native_machine_crash_shutdown(struct pt_regs *regs)
+{
+	native_machine_shutdown();
+}
+#endif
 void __noreturn machine_real_restart(unsigned int type);
 /* These must match dispatch in arch/x86/realmore/rm/reboot.S */
 #define MRR_BIOS	0
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] x86: fix build in !CONFIG_KEXEC_CORE case
  2015-08-11 13:35 [PATCH] x86: fix build in !CONFIG_KEXEC_CORE case Vitaly Kuznetsov
@ 2015-08-17 17:58 ` KY Srinivasan
  0 siblings, 0 replies; 2+ messages in thread
From: KY Srinivasan @ 2015-08-17 17:58 UTC (permalink / raw)
  To: Vitaly Kuznetsov, x86@kernel•org
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	linux-kernel@vger•kernel.org, Greg KH, Jim Davis, linux-next



> -----Original Message-----
> From: Vitaly Kuznetsov [mailto:vkuznets@redhat•com]
> Sent: Tuesday, August 11, 2015 6:36 AM
> To: x86@kernel•org
> Cc: Thomas Gleixner <tglx@linutronix•de>; Ingo Molnar
> <mingo@redhat•com>; H. Peter Anvin <hpa@zytor•com>; linux-
> kernel@vger•kernel.org; Greg KH <gregkh@linuxfoundation•org>; KY
> Srinivasan <kys@microsoft•com>; Jim Davis <jim.epost@gmail•com>; linux-
> next <linux-next@vger•kernel.org>
> Subject: [PATCH] x86: fix build in !CONFIG_KEXEC_CORE case
> 
> Recent changes in Hyper-V driver ("Drivers: hv: vmbus: add special crash
> handler") broke the build when CONFIG_KEXEC_CORE is not set. These
> changes, however, only reveal the previously existent issue: when
> CONFIG_KEXEC_CORE is not defined kernel/kexec.c is not being included in
> the build and native_machine_crash_shutdown() defined in asm/reboot.h
> has
> no implementation.
> 
> Reported-by: Jim Davis <jim.epost@gmail•com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat•com>
> ---
>  arch/x86/include/asm/reboot.h | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h
> index a82c4f1..a6c1124 100644
> --- a/arch/x86/include/asm/reboot.h
> +++ b/arch/x86/include/asm/reboot.h
> @@ -16,8 +16,15 @@ struct machine_ops {
> 
>  extern struct machine_ops machine_ops;
> 
> -void native_machine_crash_shutdown(struct pt_regs *regs);
>  void native_machine_shutdown(void);
> +#ifdef CONFIG_KEXEC_CORE
> +void native_machine_crash_shutdown(struct pt_regs *regs);
> +#else
> +static inline void native_machine_crash_shutdown(struct pt_regs *regs)
> +{
> +	native_machine_shutdown();
> +}
> +#endif
>  void __noreturn machine_real_restart(unsigned int type);
>  /* These must match dispatch in arch/x86/realmore/rm/reboot.S */
>  #define MRR_BIOS	0
> --
> 2.4.3

This patch fixes a build issue; please apply.

Regards,

K. Y

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-17 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 13:35 [PATCH] x86: fix build in !CONFIG_KEXEC_CORE case Vitaly Kuznetsov
2015-08-17 17:58 ` KY Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox