* [PATCH v3] x86: hyperv: fix build in !CONFIG_KEXEC_CORE case
@ 2015-09-23 10:02 Vitaly Kuznetsov
2015-09-28 16:36 ` [tip:x86/urgent] x86: Hyperv: fix build in %21CONFIG_KEXEC_CORE case tip-bot for Vitaly Kuznetsov
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Vitaly Kuznetsov @ 2015-09-23 10:02 UTC (permalink / raw)
To: x86
Cc: devel, linux-kernel, K. Y. Srinivasan, Haiyang Zhang,
Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Jim Davis,
Stephen Hemminger, Greg Kroah-Hartman
Recent changes in Hyper-V driver ("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 <jim.epost@gmail.com>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
Changes since v2:
- Hide hv_kexec_handler/hv_crash_handler under IS_ENABLED(CONFIG_HYPERV)
to avoid warings in !CONFIG_HYPERV && !CONFIG_KEXEC case [kbuild robot]
Changes since v1:
- Previously I tried solving the issue by defining
native_machine_crash_shutdown in !CONFIG_KEXEC_CORE case:
https://lkml.org/lkml/2015/8/11/417. This was to avoid having #ifdefs
in C code [Greg KH]. Such approach, however, raised a question on
bloating kernel with unneeded stuff [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");
}
--
2.4.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:x86/urgent] x86: Hyperv: fix build in %21CONFIG_KEXEC_CORE case
2015-09-23 10:02 [PATCH v3] x86: hyperv: fix build in !CONFIG_KEXEC_CORE case Vitaly Kuznetsov
@ 2015-09-28 16:36 ` tip-bot for Vitaly Kuznetsov
2015-09-29 7:39 ` [tip:x86/urgent] x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case tip-bot for Vitaly Kuznetsov
2015-09-30 5:45 ` [tip:x86/urgent] x86/hyperv: Fix the build in the !CONFIG_KEXEC_CORE case tip-bot for Vitaly Kuznetsov
2 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Vitaly Kuznetsov @ 2015-09-28 16:36 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, kys, gregkh, haiyangz, stephen, vkuznets, mingo,
tglx, jim.epost, hpa
Commit-ID: 353ebaa0ed39d57905eb197291c50395aee5e092
Gitweb: http://git.kernel.org/tip/353ebaa0ed39d57905eb197291c50395aee5e092
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
AuthorDate: Wed, 23 Sep 2015 12:02:57 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 28 Sep 2015 18:34:00 +0200
x86: Hyperv: fix build in %21CONFIG_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:
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 <jim.epost@gmail.com>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: devel@linuxdriverproject.org
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: http://lkml.kernel.org/r/1443002577-25370-1-git-send-email-vkuznets@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
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");
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [tip:x86/urgent] x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case
2015-09-23 10:02 [PATCH v3] x86: hyperv: fix build in !CONFIG_KEXEC_CORE case Vitaly Kuznetsov
2015-09-28 16:36 ` [tip:x86/urgent] x86: Hyperv: fix build in %21CONFIG_KEXEC_CORE case tip-bot for Vitaly Kuznetsov
@ 2015-09-29 7:39 ` tip-bot for Vitaly Kuznetsov
2015-09-29 11:55 ` Vitaly Kuznetsov
2015-09-30 5:45 ` [tip:x86/urgent] x86/hyperv: Fix the build in the !CONFIG_KEXEC_CORE case tip-bot for Vitaly Kuznetsov
2 siblings, 1 reply; 6+ messages in thread
From: tip-bot for Vitaly Kuznetsov @ 2015-09-29 7:39 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, mingo, peterz, hpa, vkuznets, torvalds, jim.epost,
tglx, stephen, kys, gregkh, haiyangz
Commit-ID: 7d381b749a010ccd48d5649c843cac0d14d1c229
Gitweb: http://git.kernel.org/tip/7d381b749a010ccd48d5649c843cac0d14d1c229
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
AuthorDate: Wed, 23 Sep 2015 12:02:57 +0200
Committer: Ingo Molnar <mingo@kernel.org>
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 <jim.epost@gmail.com>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: devel@linuxdriverproject.org
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1443002577-25370-1-git-send-email-vkuznets@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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");
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [tip:x86/urgent] x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case
2015-09-29 7:39 ` [tip:x86/urgent] x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case tip-bot for Vitaly Kuznetsov
@ 2015-09-29 11:55 ` Vitaly Kuznetsov
2015-09-30 5:44 ` Ingo Molnar
0 siblings, 1 reply; 6+ messages in thread
From: Vitaly Kuznetsov @ 2015-09-29 11:55 UTC (permalink / raw)
To: mingo
Cc: linux-tip-commits, haiyangz, stephen, kys, gregkh, torvalds, tglx,
jim.epost, peterz, hpa, linux-kernel,
tip-bot for Vitaly Kuznetsov
tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> writes:
> Commit-ID: 7d381b749a010ccd48d5649c843cac0d14d1c229
> Gitweb: http://git.kernel.org/tip/7d381b749a010ccd48d5649c843cac0d14d1c229
> Author: Vitaly Kuznetsov <vkuznets@redhat.com>
> AuthorDate: Wed, 23 Sep 2015 12:02:57 +0200
> Committer: Ingo Molnar <mingo@kernel.org>
> CommitDate: Tue, 29 Sep 2015 09:37:06 +0200
>
> x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case
It was '!CONFIG_KEXEC_CORE' in the original patch so I'd expect to see
'CONFIG_KEXEC_CORE=n' here (if the '!' sign causes issues).
[...]
--
Vitaly
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [tip:x86/urgent] x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case
2015-09-29 11:55 ` Vitaly Kuznetsov
@ 2015-09-30 5:44 ` Ingo Molnar
0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2015-09-30 5:44 UTC (permalink / raw)
To: Vitaly Kuznetsov
Cc: linux-tip-commits, haiyangz, stephen, kys, gregkh, torvalds, tglx,
jim.epost, peterz, hpa, linux-kernel,
tip-bot for Vitaly Kuznetsov
* Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
> tip-bot for Vitaly Kuznetsov <tipbot@zytor.com> writes:
>
> > Commit-ID: 7d381b749a010ccd48d5649c843cac0d14d1c229
> > Gitweb: http://git.kernel.org/tip/7d381b749a010ccd48d5649c843cac0d14d1c229
> > Author: Vitaly Kuznetsov <vkuznets@redhat.com>
> > AuthorDate: Wed, 23 Sep 2015 12:02:57 +0200
> > Committer: Ingo Molnar <mingo@kernel.org>
> > CommitDate: Tue, 29 Sep 2015 09:37:06 +0200
> >
> > x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case
>
> It was '!CONFIG_KEXEC_CORE' in the original patch so I'd expect to see
> 'CONFIG_KEXEC_CORE=n' here (if the '!' sign causes issues).
>
> [...]
Ok, fixed it up.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tip:x86/urgent] x86/hyperv: Fix the build in the !CONFIG_KEXEC_CORE case
2015-09-23 10:02 [PATCH v3] x86: hyperv: fix build in !CONFIG_KEXEC_CORE case Vitaly Kuznetsov
2015-09-28 16:36 ` [tip:x86/urgent] x86: Hyperv: fix build in %21CONFIG_KEXEC_CORE case tip-bot for Vitaly Kuznetsov
2015-09-29 7:39 ` [tip:x86/urgent] x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case tip-bot for Vitaly Kuznetsov
@ 2015-09-30 5:45 ` tip-bot for Vitaly Kuznetsov
2 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Vitaly Kuznetsov @ 2015-09-30 5:45 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, stephen, mingo, torvalds, kys, peterz, haiyangz, vkuznets,
hpa, linux-kernel, gregkh, jim.epost
Commit-ID: 1e034743e918d195d339af340ae933727c072bce
Gitweb: http://git.kernel.org/tip/1e034743e918d195d339af340ae933727c072bce
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
AuthorDate: Wed, 23 Sep 2015 12:02:57 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 30 Sep 2015 07:44:15 +0200
x86/hyperv: Fix the build in the !CONFIG_KEXEC_CORE 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 <jim.epost@gmail.com>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: devel@linuxdriverproject.org
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1443002577-25370-1-git-send-email-vkuznets@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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");
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-09-30 5:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-23 10:02 [PATCH v3] x86: hyperv: fix build in !CONFIG_KEXEC_CORE case Vitaly Kuznetsov
2015-09-28 16:36 ` [tip:x86/urgent] x86: Hyperv: fix build in %21CONFIG_KEXEC_CORE case tip-bot for Vitaly Kuznetsov
2015-09-29 7:39 ` [tip:x86/urgent] x86/hyperv: Fix the build in the CONFIG_KEXEC_CORE=y case tip-bot for Vitaly Kuznetsov
2015-09-29 11:55 ` Vitaly Kuznetsov
2015-09-30 5:44 ` Ingo Molnar
2015-09-30 5:45 ` [tip:x86/urgent] x86/hyperv: Fix the build in the !CONFIG_KEXEC_CORE case tip-bot for Vitaly Kuznetsov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.