Re: Calling suspend() in halt/restart/shutdown -> not a good idea

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Aug 3, 2005, at 07:40:54, Benjamin Herrenschmidt wrote:
I'd like to get rid of shutdown callback. Having two copies of code
(one in callback, one in suspend) is ugly.

Well, it's obviously not a good time for this. First, suspend and
shutdown don't necessarily do the same thing, then it just doesn't work in practice. So either do it right completely or not at all, but 2.6.13
isn't the place for an half-assed hack that looks like a solution to
you.

One possible way to proceed might be to add a new callback that takes a
pm_message_t: powerdown()  If it exists, it would be called in both the
suspend and shutdown paths, before the suspend() and shutdown() calls to
that driver are made.  As drivers are fixed to clean up and combine that
code, they could put the merged result into the powerdown() function,
and remove their suspend() and shutdown() functions.

Cheers,
Kyle Moffett

--
I lost interest in "blade servers" when I found they didn't throw knives at
people who weren't supposed to be in your machine room.
  -- Anthony de Boer


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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux