You still are addicted to the current suspend mechanism. :)
The whole point of doing it from idle in the form of a deep power
state is to avoid the massive sh*tload of work which is neccesary to
run the existing suspend code. But that needs runtime power management
and tweaks to avoid your timers waking you, etc.
The mechanism you want to use is: suspend no matter what, like closing
the lid of the laptop, but with a few tweaks around it:
1) An interrupt on a wakeup source which comes in while the suspend
code runs, i.e before you transitioned into wakeup mode, must
abort / prevent suspend.
2) Prevent another attempt to suspend before the event has been
delivered and the apps have signaled that they have not longer
any work to do.
As a side effect you confine crappy apps with that mechanism in
some way.
In the laptop case we do not want the tweaks as not going into suspend
might set your backpack on fire.
If I understood you correctly then you can shutdown the CPU in idle
completelty already, but that's not enough due to:
1) crappy applications keeping the cpu away from idle
2) timers firing
Would solving those two issues be sufficient for you or am I missing
something ?
Thanks,
tglx