lkml.org 
[lkml]   [2011]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 7/8] kernel/power/main.c: Not suspend/resume if CPU0 is offlined
    Hi,

    On 10/05/2011 10:09 PM, Fenghua Yu wrote:
    >
    > @@ -178,6 +179,14 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,
    > int len;
    > int error = -EINVAL;
    >
    > +#ifdef CONFIG_HOTPLUG_CPU
    > + if (bsp_hotpluggable && cpumask_first(cpu_online_mask) != 0) {
    > + printk(KERN_WARNING "Because CPU0 is offlined, system can't suspend/resume.\n");
    > +
    > + return -ENODEV;
    > + }
    > +#endif

    There is a possible race condition here. What if CPU0 gets offlined
    AFTER this point(due to a CPU hotplug operation)?
    We will probably have to prevent CPU0 from being taken offline from
    this point onwards, and remove that restriction later on.

    > +
    > p = memchr(buf, '\n', n);
    > len = p ? p - buf : n;
    >


    --
    Regards,
    Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
    Linux Technology Center,
    IBM India Systems and Technology Lab


    \
     
     \ /
      Last update: 2011-10-05 20:39    [W:0.023 / U:30.412 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site