debuggers.hg

changeset 22798:ff97273750b8

cpu hotplug: Core functions are quiet on failure.

This was already inconsistent, so make them consistently quiet and
leave it to callers to log an error. Add suitable error logging to the
arch-specific CPU bringup loops,

In particular this avoids printing error on EBUSY, in which case
caller may want a silent retry loop.

Signed-off-by: Keir Fraser <keir@xen.org>
author Keir Fraser <keir@xen.org>
date Fri Jan 14 09:52:02 2011 +0000 (2011-01-14)
parents 58304c1cc725
children c3b5924919e3
files xen/arch/ia64/xen/xensetup.c xen/arch/x86/setup.c xen/common/cpu.c
line diff
     1.1 --- a/xen/arch/ia64/xen/xensetup.c	Fri Jan 14 09:11:28 2011 +0000
     1.2 +++ b/xen/arch/ia64/xen/xensetup.c	Fri Jan 14 09:52:02 2011 +0000
     1.3 @@ -606,7 +606,11 @@ printk("num_online_cpus=%d, max_cpus=%d\
     1.4          if ( num_online_cpus() >= max_cpus )
     1.5              break;
     1.6          if ( !cpu_online(i) )
     1.7 -            cpu_up(i);
     1.8 +        {
     1.9 +            int ret = cpu_up(i);
    1.10 +            if ( ret != 0 )
    1.11 +                printk("Failed to bring up CPU %u (error %d)\n", i, ret);
    1.12 +        }
    1.13      }
    1.14  
    1.15      local_irq_disable();
     2.1 --- a/xen/arch/x86/setup.c	Fri Jan 14 09:11:28 2011 +0000
     2.2 +++ b/xen/arch/x86/setup.c	Fri Jan 14 09:52:02 2011 +0000
     2.3 @@ -1246,7 +1246,11 @@ void __init __start_xen(unsigned long mb
     2.4          numa_add_cpu(i);        
     2.5  
     2.6          if ( (num_online_cpus() < max_cpus) && !cpu_online(i) )
     2.7 -            cpu_up(i);
     2.8 +        {
     2.9 +            int ret = cpu_up(i);
    2.10 +            if ( ret != 0 )
    2.11 +                printk("Failed to bring up CPU %u (error %d)\n", i, ret);
    2.12 +        }
    2.13      }
    2.14  
    2.15      printk("Brought up %ld CPUs\n", (long)num_online_cpus());
     3.1 --- a/xen/common/cpu.c	Fri Jan 14 09:11:28 2011 +0000
     3.2 +++ b/xen/common/cpu.c	Fri Jan 14 09:52:02 2011 +0000
     3.3 @@ -108,7 +108,6 @@ int cpu_down(unsigned int cpu)
     3.4   fail:
     3.5      notifier_rc = notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED, hcpu, &nb);
     3.6      BUG_ON(notifier_rc != NOTIFY_DONE);
     3.7 -    printk("Failed to take down CPU %u (error %d)\n", cpu, err);
     3.8      cpu_hotplug_done();
     3.9      return err;
    3.10  }
    3.11 @@ -150,7 +149,6 @@ int cpu_up(unsigned int cpu)
    3.12   fail:
    3.13      notifier_rc = notifier_call_chain(&cpu_chain, CPU_UP_CANCELED, hcpu, &nb);
    3.14      BUG_ON(notifier_rc != NOTIFY_DONE);
    3.15 -    printk("Failed to bring up CPU %u (error %d)\n", cpu, err);
    3.16      cpu_hotplug_done();
    3.17      return err;
    3.18  }