linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Michael Schmitz <schmitz@opal.biophys.uni-duesseldorf.de>,
	Hugang <hugang@soulinfo.com>,
	Patrick Mochel <mochel@digitalimplant.org>,
	Nigel Cunningham <ncunningham@users.sourceforge.net>,
	ncunningham@clear.net.nz,
	linuxppc-dev list <linuxppc-dev@lists.linuxppc.org>
Subject: Re: pmdisk working on ppc (WAS: Help port swsusp to ppc)
Date: Tue, 27 Jan 2004 21:56:04 +1100	[thread overview]
Message-ID: <1075200963.17953.198.camel@gaston> (raw)
In-Reply-To: <20040127104701.GB18666@elf.ucw.cz>


> What is "PMU locking"? Is there some part of powermac harware that
> kills machine if you sleep too long with interrupts disabled?

The PMU is the "Power Management Unit". It's a microcontroller
that does a bunch of things, some PM related, but also the ADB
emulation for the keyboard & trackpad on laptops, the real time
clock, battery management, etc...

We communicate with it via an SPI, it's asynchronous (interrupt
driven) protocol (banging things to a shit register basically).

The kernel is continuously talking to the PMU. If for some reason
communication stops in the middle of a message exchange, the PMU
can time out and shuts the box down.

"PMU suspend" is a hook I added to the driver that completes
pending requests and stops answering to "event" interrupts (those
interrupts are sent by the PMU when we need to read it's incoming
event messages, like keystrokes, environement events, etc...).

When we get such an interrupt, we send a command to read the
event and get the data in the reply. The PMU can timeout in the
middle of that exchange, but won't timeout if we don't ask for
the data at all...

On suspend-to-RAM, since the PMU driver drives the whole suspend
process, there is no real problem, it does things the right way.

But with suspend-to-disk, it's just yet-another device, and so we
need to make sure we properly stop pending communication. The quick
hack I did (added a sysdev with suspend/resume hooks for it) may not
be perfect yet :)

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

      reply	other threads:[~2004-01-27 10:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1075154452.6191.91.camel@gaston>
2004-01-27 10:34 ` pmdisk working on ppc (WAS: Help port swsusp to ppc) Michael Schmitz
2004-01-27 10:37   ` Benjamin Herrenschmidt
2004-01-27 14:32     ` Michael Schmitz
2004-01-27 21:40       ` Benjamin Herrenschmidt
2004-01-28 16:09         ` Michael Schmitz
2004-01-28 17:02           ` Hugang
2004-01-28 17:03             ` Colin Leroy
2004-01-29  9:17               ` Michael Schmitz
2004-01-28 18:00             ` Michael Schmitz
2004-01-28 21:56             ` Benjamin Herrenschmidt
2004-01-28 21:55           ` Benjamin Herrenschmidt
2004-01-29  9:30             ` Michael Schmitz
2004-01-29 12:10               ` Benjamin Herrenschmidt
2004-01-28 21:55           ` Benjamin Herrenschmidt
2004-01-28 23:35             ` Pavel Machek
2004-01-29  8:11             ` Michael Schmitz
2004-01-27 10:47   ` Pavel Machek
2004-01-27 10:56     ` Benjamin Herrenschmidt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1075200963.17953.198.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=hugang@soulinfo.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=mochel@digitalimplant.org \
    --cc=ncunningham@clear.net.nz \
    --cc=ncunningham@users.sourceforge.net \
    --cc=pavel@ucw.cz \
    --cc=schmitz@opal.biophys.uni-duesseldorf.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).