Re: Next step of smp support & fix device suspending

From: Patrick Mochel
Date: Mon Jun 28 2004 - 10:16:19 EST



> This introduces functions for stopping all-but-boot-cpus, which will
> be needed for smp suspend, and fixes level for calling driver model:
> there's no D4 power level, only D3 (means device off), and tg3 driver
> actually cares. Ugh and one useless mdelay killed, and
> freeze_processes() now BUGS() if its not compiled in. [We can probably
> just remove it for non-CONFIG_PM case in future]. It is bad idea to
> pretend success, and nobody should ever call it in !CONFIG_PM case
> anyway. Please apply,

Nice, just a couple of questions...

> - device_power_down(4);
> + device_power_down(3);

There are defined values in include/linux/device.h. You should be using
those, instead of the magic constants (even if the magic constants
actually make sense as the power states :).

> PRINTK( "Waiting for DMAs to settle down...\n");
> mdelay(1000); /* We do not want some readahead with DMA to corrupt our memory, right?
> Do it with disabled interrupts for best effect. That way, if some

On a related note, can we kill this piece of code? It's not clear that
it's necessary. If it is, it begs for a more systematic way of achieving
the goal.


Pat
-
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/