Re: [linux-pm] s2ram: warn when interrupts should be disabled but are not

From: David Brownell
Date: Mon Apr 14 2008 - 01:24:39 EST


On Saturday 12 April 2008, Pavel Machek wrote:
> +                                       WARN_ON(!irqs_disabled());
>                                         ret = drv->suspend(sysdev, state);

Wouldn't it be better to assert the warning AFTER the
driver had a chance to screw it up? (On the resume
side of things too.)

We know IRQs were disabled on entry to the loop.
If something went wrong it was some goofy driver.
Best warn about it ASAP instead of *maybe* getting
a warning before the next driver (if there is one).

And if you're concerned about such issues, I'd think
similar warnings would be done in suspend_late() and
resume_early() support...

- Dave


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