linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Xen: Fix build when !CONFIG_HOTPLUG_CPU
@ 2008-09-08 12:43 Alex Nixon
  2008-09-08 12:43 ` [PATCH 2/2] Xen: Make CPU hotplug functions static Alex Nixon
  2008-09-08 17:12 ` [PATCH 1/2] Xen: Fix build when !CONFIG_HOTPLUG_CPU Ingo Molnar
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Nixon @ 2008-09-08 12:43 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Alex Nixon, Jeremy Fitzhardinge, Ingo Molnar

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/xen/smp.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index be5cbb2..bf51a46 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -332,6 +332,7 @@ static void xen_smp_cpus_done(unsigned int max_cpus)
 {
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
 int xen_cpu_disable(void)
 {
 	unsigned int cpu = smp_processor_id();
@@ -368,6 +369,23 @@ void xen_play_dead(void)
 	cpu_bringup();
 }
 
+#else /* !CONFIG_HOTPLUG_CPU */
+int xen_cpu_disable(void)
+{
+	return -ENOSYS;
+}
+
+void xen_cpu_die(unsigned int cpu)
+{
+	BUG();
+}
+
+void xen_play_dead(void)
+{
+	BUG();
+}
+
+#endif
 static void stop_self(void *v)
 {
 	int cpu = smp_processor_id();
-- 
1.5.4.3


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

* [PATCH 2/2] Xen: Make CPU hotplug functions static
  2008-09-08 12:43 [PATCH 1/2] Xen: Fix build when !CONFIG_HOTPLUG_CPU Alex Nixon
@ 2008-09-08 12:43 ` Alex Nixon
  2008-09-08 17:12 ` [PATCH 1/2] Xen: Fix build when !CONFIG_HOTPLUG_CPU Ingo Molnar
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Nixon @ 2008-09-08 12:43 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Alex Nixon, Jeremy Fitzhardinge, Ingo Molnar

There's no need for these functions to be accessed from outside of xen/smp.c

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/xen/smp.c     |   12 ++++++------
 arch/x86/xen/xen-ops.h |    4 ----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index bf51a46..d77da61 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -333,7 +333,7 @@ static void xen_smp_cpus_done(unsigned int max_cpus)
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-int xen_cpu_disable(void)
+static int xen_cpu_disable(void)
 {
 	unsigned int cpu = smp_processor_id();
 	if (cpu == 0)
@@ -345,7 +345,7 @@ int xen_cpu_disable(void)
 	return 0;
 }
 
-void xen_cpu_die(unsigned int cpu)
+static void xen_cpu_die(unsigned int cpu)
 {
 	while (HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL)) {
 		current->state = TASK_UNINTERRUPTIBLE;
@@ -362,7 +362,7 @@ void xen_cpu_die(unsigned int cpu)
 		alternatives_smp_switch(0);
 }
 
-void xen_play_dead(void)
+static void xen_play_dead(void)
 {
 	play_dead_common();
 	HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);
@@ -370,17 +370,17 @@ void xen_play_dead(void)
 }
 
 #else /* !CONFIG_HOTPLUG_CPU */
-int xen_cpu_disable(void)
+static int xen_cpu_disable(void)
 {
 	return -ENOSYS;
 }
 
-void xen_cpu_die(unsigned int cpu)
+static void xen_cpu_die(unsigned int cpu)
 {
 	BUG();
 }
 
-void xen_play_dead(void)
+static void xen_play_dead(void)
 {
 	BUG();
 }
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index 8dbd97f..d7422dc 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -51,10 +51,6 @@ void xen_mark_init_mm_pinned(void);
 
 void __init xen_setup_vcpu_info_placement(void);
 
-void xen_play_dead(void);
-void xen_cpu_die(unsigned int cpu);
-int xen_cpu_disable(void);
-
 #ifdef CONFIG_SMP
 void xen_smp_init(void);
 
-- 
1.5.4.3


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

* Re: [PATCH 1/2] Xen: Fix build when !CONFIG_HOTPLUG_CPU
  2008-09-08 12:43 [PATCH 1/2] Xen: Fix build when !CONFIG_HOTPLUG_CPU Alex Nixon
  2008-09-08 12:43 ` [PATCH 2/2] Xen: Make CPU hotplug functions static Alex Nixon
@ 2008-09-08 17:12 ` Ingo Molnar
  1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2008-09-08 17:12 UTC (permalink / raw)
  To: Alex Nixon; +Cc: Linux Kernel Mailing List, Jeremy Fitzhardinge


* Alex Nixon <alex.nixon@citrix.com> wrote:

> Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
> Cc: Ingo Molnar <mingo@elte.hu>
> ---
>  arch/x86/xen/smp.c |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)

applied to tip/x86/xen - thanks Alex. I've also merged the latest 
tip/x86/xen code into tip/master and i'm testing the result now.

	Ingo

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

end of thread, other threads:[~2008-09-08 17:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-08 12:43 [PATCH 1/2] Xen: Fix build when !CONFIG_HOTPLUG_CPU Alex Nixon
2008-09-08 12:43 ` [PATCH 2/2] Xen: Make CPU hotplug functions static Alex Nixon
2008-09-08 17:12 ` [PATCH 1/2] Xen: Fix build when !CONFIG_HOTPLUG_CPU Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).