LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] eHCA: Make scaling code also work without CPU hotplug
@ 2007-03-22 15:52 Joachim Fenkes
  2007-03-22 18:00 ` Roland Dreier
  0 siblings, 1 reply; 2+ messages in thread
From: Joachim Fenkes @ 2007-03-22 15:52 UTC (permalink / raw)
  To: rolandd, linuxppc-dev, linux-kernel, general; +Cc: hnguyen

eHCA scaling code must not depend on register_cpu_notifier() if
CONFIG_HOTPLUG_CPU is not set, so put all related code into #ifdefs.


Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
---


 ehca_irq.c |    8 ++++++++
 1 file changed, 8 insertions(+)


diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c
index 20f36bf..f284be1 100644
--- a/drivers/infiniband/hw/ehca/ehca_irq.c
+++ b/drivers/infiniband/hw/ehca/ehca_irq.c
@@ -66,7 +66,9 @@ #define ERROR_DATA_TYPE        EHCA_BMAS
 static void queue_comp_task(struct ehca_cq *__cq);
 
 static struct ehca_comp_pool* pool;
+#ifdef CONFIG_HOTPLUG_CPU
 static struct notifier_block comp_pool_callback_nb;
+#endif
 
 static inline void comp_event_callback(struct ehca_cq *cq)
 {
@@ -733,6 +735,7 @@ static void take_over_work(struct ehca_c
 
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
 static int comp_pool_callback(struct notifier_block *nfb,
 			      unsigned long action,
 			      void *hcpu)
@@ -775,6 +778,7 @@ static int comp_pool_callback(struct not
 
 	return NOTIFY_OK;
 }
+#endif
 
 int ehca_create_comp_pool(void)
 {
@@ -805,9 +809,11 @@ int ehca_create_comp_pool(void)
 		}
 	}
 
+#ifdef CONFIG_HOTPLUG_CPU
 	comp_pool_callback_nb.notifier_call = comp_pool_callback;
 	comp_pool_callback_nb.priority =0;
 	register_cpu_notifier(&comp_pool_callback_nb);
+#endif
 
 	printk(KERN_INFO "eHCA scaling code enabled\n");
 
@@ -821,7 +827,9 @@ void ehca_destroy_comp_pool(void)
 	if (!ehca_scaling_code)
 		return;
 
+#ifdef CONFIG_HOTPLUG_CPU
 	unregister_cpu_notifier(&comp_pool_callback_nb);
+#endif
 
 	for (i = 0; i < NR_CPUS; i++) {
 		if (cpu_online(i))


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

* Re: [PATCH] eHCA: Make scaling code also work without CPU hotplug
  2007-03-22 15:52 [PATCH] eHCA: Make scaling code also work without CPU hotplug Joachim Fenkes
@ 2007-03-22 18:00 ` Roland Dreier
  0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2007-03-22 18:00 UTC (permalink / raw)
  To: Joachim Fenkes; +Cc: rolandd, linuxppc-dev, linux-kernel, general, hnguyen

thanks, applied.

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

end of thread, other threads:[~2007-03-22 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-22 15:52 [PATCH] eHCA: Make scaling code also work without CPU hotplug Joachim Fenkes
2007-03-22 18:00 ` Roland Dreier

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).