Re: 2.6.12-rc2-mm2

From: Alexander Nyberg
Date: Sun Apr 10 2005 - 08:34:15 EST


> - Largeish x86_64 update

Hi Pavel

I'm playing a bit with suspend on smp, we need something like this:
As the cpu-mask is set to only this cpu _smp_processor_id() is safe.

Index: linux-2.6.11/kernel/power/smp.c
===================================================================
--- linux-2.6.11.orig/kernel/power/smp.c 2005-04-10 09:43:13.000000000 +0200
+++ linux-2.6.11/kernel/power/smp.c 2005-04-10 15:23:36.000000000 +0200
@@ -46,13 +46,13 @@

void disable_nonboot_cpus(void)
{
- printk("Freezing CPUs (at %d)", smp_processor_id());
oldmask = current->cpus_allowed;
set_cpus_allowed(current, cpumask_of_cpu(0));
+ printk("Freezing CPUs (at %d)", _smp_processor_id());
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ);
printk("...");
- BUG_ON(smp_processor_id() != 0);
+ BUG_ON(_smp_processor_id() != 0);

/* FIXME: for this to work, all the CPUs must be running
* "idle" thread (or we deadlock). Is that guaranteed? */


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/