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>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
static void queue_comp_task(struct ehca_cq *__cq);
static struct ehca_comp_pool* pool;
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;
static struct notifier_block comp_pool_callback_nb;
static inline void comp_event_callback(struct ehca_cq *cq)
{
static inline void comp_event_callback(struct ehca_cq *cq)
{
+#ifdef CONFIG_HOTPLUG_CPU
static int comp_pool_callback(struct notifier_block *nfb,
unsigned long action,
void *hcpu)
static int comp_pool_callback(struct notifier_block *nfb,
unsigned long action,
void *hcpu)
int ehca_create_comp_pool(void)
{
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);
comp_pool_callback_nb.notifier_call = comp_pool_callback;
comp_pool_callback_nb.priority =0;
register_cpu_notifier(&comp_pool_callback_nb);
printk(KERN_INFO "eHCA scaling code enabled\n");
printk(KERN_INFO "eHCA scaling code enabled\n");
if (!ehca_scaling_code)
return;
if (!ehca_scaling_code)
return;
+#ifdef CONFIG_HOTPLUG_CPU
unregister_cpu_notifier(&comp_pool_callback_nb);
unregister_cpu_notifier(&comp_pool_callback_nb);
for (i = 0; i < NR_CPUS; i++) {
if (cpu_online(i))
for (i = 0; i < NR_CPUS; i++) {
if (cpu_online(i))