Hi! > On Wed, Mar 16, 2005 at 02:21:52PM +0100, Pavel Machek wrote: > > + int cpu, error; > > + cpus_clear(frozen_cpus); > > + printk("Freezing cpus...\n"); > > + for_each_online_cpu(cpu) { > > + if (!cpu) > > + continue; > > + cpu_set(cpu, frozen_cpus); > > + error = cpu_down(cpu); > > + if (!error) > > + continue; > > + printk("Error taking cpu %d down: %d\n", cpu, error); > > + panic("Too many cpus"); > > } > > - printk("ok\n"); > > + BUG_ON(smp_processor_id() != 0); > > } > > > > void enable_nonboot_cpus(void) > > { > > - printk("Restarting CPUs"); > > - atomic_set(&freeze, 0); > > - while (atomic_read(&cpu_counter)) { > > - cpu_relax(); > > - barrier(); > > + int cpu, error; > > + printk("Thawing cpus...\n"); > > + for_each_cpu_mask(cpu, frozen_cpus) { > > + if (!cpu) > > + continue; > > + error = cpu_up(cpu); > > + if (!error) > > + continue; > > + printk("Error taking cpu %d up: %d\n", cpu, error); > > + panic("Not enough cpus"); > > } > > If you're going to depend on CONFIG_HOTPLUG_CPU for swsusp on smp, why > not offline the non-boot cpus from userspace? Same goes for onlining > additional cpus during resume.
I'd like to stay in control. I may want to stop drivers first, or something like that. Plus I need to do that during resume, too, when userspace is not available, yet. Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl! - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/