Re: [linux-pm] [RFC][PATCH][1/8] PM: Rework handling of interrupts during suspend-resume (rev. 5)





On Sat, 7 Mar 2009, Alan Stern wrote:

You didn't answer my question. Why bother to distinguish between
"wake-up" interrupts and non-"wake-up" interrupts?

In other words, why not simply abort the suspend if IRQ_PENDING is set
for _any_ interrupt during sysdev_suspend()?

.. because some drivers might not actually shut down the hardware until
they get to "suspend_late"? If even then, for that matter - a driver may
simply not care, knowing that the hardware will be powered off, and will
be re-initialized at resume.

The thinking that you have to shut your hardware down at "->suspend()"
time is a _disease_. There are literally classes of hardware out there
where that would be an outright _bug_, like for a PCI bridge device. For
many devices, "suspend()" has to be the phase where you shut down the
_external_ stuff (eg for a disk controller, it's when you'd flush and stop
your disks), but the controller itself may well be alive until later.

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



Relevant Pages

  • Re: Flames over -- Re: Which is simpler?
    ... state in the hardware and maintaining it somewhere else. ... During suspend the hardware is usually completely powered off, and in either case, there is nothing running on the CPU to monitor device insertion/removal. ... that you have not unplugged the disk, nothing will be screwed when you resume from disk or ram. ... Whether the disk is connected via SCSI, SATA, USB, or whatever does not matter. ...
    (Linux-Kernel)
  • Re: [linux-pm] Fundamental flaw in system suspend, exposed by freezer removal
    ... which would cause the hardware to make it a very short suspend state. ... "Defer handling" is more to the point, be it by hardware or software. ... It depends on the bus. ... scanning isn't necessary. ...
    (Linux-Kernel)
  • Re: [PATCH] serial-core: resume serial hardware with no_console_suspend
    ... The patch attempts to keep hardware running before suspend and run ... Calling of resume without suspend seems to be dangerous. ... the console from being suspended but _also_ resumed. ...
    (Linux-Kernel)
  • Fwd: Faster resuming of suspend technology.
    ... and actually you can download 100MBytes suspend image within 30sec. ... Another issues is that at the moment, hotplugging is work in progress. ... and the same hardware configuration in the resumed system. ... not swsusp2. ...
    (Linux-Kernel)
  • Re: Flames over -- Re: Which is simpler?
    ... maintaining state in the hardware and maintaining it somewhere else. ... The biggest difference is that if the hardware retains suspend power, it is able to detect disconnections. ...
    (Linux-Kernel)

Loading