public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Pavel Machek <pavel@suse.cz>
Cc: linux-pm <linux-pm@lists.osdl.org>
Subject: Re: [PATCH] pm_ops: add irq enable/disable hooks
Date: Wed, 11 Apr 2007 13:15:18 +0200	[thread overview]
Message-ID: <1176290118.14149.20.camel@johannes.berg> (raw)
In-Reply-To: <20070410113623.GF8239@elf.ucw.cz>


[-- Attachment #1.1: Type: text/plain, Size: 1622 bytes --]

On Tue, 2007-04-10 at 13:36 +0200, Pavel Machek wrote:

> Hmm, and can't you simply create sysdev for decrementer and special
> platform handling? sysdevs should be suspended last...

So I looked again and noticed that my earlier statement was wrong.

The special platform handling can well be done with platform devices, I
can simply insert them into the power management list early by using a
quite early initcall when registering them, that way they'll be
suspended last. So contrary to what I said, those aren't a problem.

The decrementer, however, I looked at again and noticed that I had a
wrong assumption. Let me give a short description of how the decrementer
works first:

The decrementer is a 32-bit register that counts down based on an
implementation-dependent clock, on my powerbook it's somewhere around
18MHz, on my powermac 32MHz (IIRC). When the most significant bit
transitions from 0 to 1 the decrementer exception is raised, when
exceptions are enabled it's taken. However, when exceptions are
disabled, it stays pending until it is taken when exceptions are enabled
again.

Because the exception stays pending, we need to set the decrementer to
the highest possible value before interrupts are disabled so we can be
sure that the exception is not pending. This is to ensure that the
processor can later go to sleep properly to be turned off.

Since we only have a limited amount of time after setting the
decrementer to such a high value (granted, it's at least a minute in all
cases I've seen so far) we like to do it right before disabling
interrupts.

johannes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  parent reply	other threads:[~2007-04-11 11:15 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 21:54 [PATCH] pm_ops: add irq enable/disable hooks Johannes Berg
2007-04-05 23:30 ` Rafael J. Wysocki
2007-04-05 23:28   ` Johannes Berg
2007-04-06  0:02     ` Rafael J. Wysocki
2007-04-06  0:09       ` Johannes Berg
2007-04-06  0:17         ` Rafael J. Wysocki
2007-04-06  8:48           ` Johannes Berg
2007-04-06  9:41             ` Rafael J. Wysocki
2007-04-06  9:44               ` Johannes Berg
2007-04-06 10:02                 ` Rafael J. Wysocki
2007-04-06 10:00                   ` Johannes Berg
2007-04-06 19:19                 ` Pavel Machek
2007-04-06 21:59                   ` Johannes Berg
2007-04-10 11:36                     ` Pavel Machek
2007-04-10 11:45                       ` Johannes Berg
2007-04-10 12:00                         ` Pavel Machek
2007-04-10 13:42                           ` Johannes Berg
2007-04-11 11:22                           ` Benjamin Herrenschmidt
2007-04-11 14:07                             ` Alan Stern
2007-04-11 16:39                               ` Johannes Berg
2007-04-11 21:40                               ` Benjamin Herrenschmidt
2007-04-11 11:15                       ` Johannes Berg [this message]
2007-04-06 19:16 ` Pavel Machek
2007-04-11 15:54 ` [PATCH v2] pm_ops: add system quiesce/activate hooks Johannes Berg
2007-04-11 20:47   ` Dmitry Krivoschekov
2007-04-12  8:39     ` Johannes Berg
2007-04-12  8:42     ` Benjamin Herrenschmidt
2007-04-12 10:16       ` Pavel Machek
2007-04-12 10:45         ` Rafael J. Wysocki
2007-04-12 10:47         ` Johannes Berg
2007-04-13 21:00           ` Pavel Machek
2007-04-13 21:11             ` Johannes Berg
2007-04-13 21:43               ` Pavel Machek
2007-04-13 21:11             ` Paul Mackerras
2007-04-13 21:15             ` Benjamin Herrenschmidt
2007-04-12 11:23         ` Benjamin Herrenschmidt
2007-04-12 15:03           ` Rafael J. Wysocki
2007-04-12 16:32             ` David Brownell
2007-04-13  6:52               ` Johannes Berg
2007-04-13  7:59               ` [PATCH v3] " Johannes Berg
2007-04-12 17:36           ` [PATCH v2] " Dmitry Krivoschekov
2007-04-12 20:51             ` Benjamin Herrenschmidt
2007-04-13  6:54             ` Johannes Berg
2007-04-13  8:04               ` David Brownell
2007-04-13  8:59             ` Johannes Berg
2007-04-13  9:07               ` Benjamin Herrenschmidt
2007-04-13 11:47                 ` Rafael J. Wysocki
2007-04-13 12:58                   ` Johannes Berg
2007-04-13 13:26                   ` [PATCH v4] " Johannes Berg
2007-04-13 20:43                     ` Rafael J. Wysocki
2007-04-13 20:58                       ` Pavel Machek
2007-04-13 21:06                         ` Johannes Berg
2007-04-13 21:12                           ` Pavel Machek
2007-04-13 21:18                             ` Johannes Berg
2007-04-13 21:33                               ` Pavel Machek
2007-04-13 21:45                                 ` Johannes Berg
2007-04-13 21:52                                   ` Pavel Machek
2007-04-13 21:59                                     ` Johannes Berg
2007-04-13 22:18                                       ` Rafael J. Wysocki
2007-04-13 22:20                                         ` Johannes Berg
2007-04-13 22:49                                           ` Rafael J. Wysocki
2007-04-13 22:55                                             ` Johannes Berg
2007-04-13 22:09                                 ` Rafael J. Wysocki
2007-04-13 22:13                                   ` Johannes Berg
2007-04-13 22:16                                     ` Pavel Machek
2007-04-14 16:55                                       ` Paul Mackerras
2007-04-13 22:25                                   ` Benjamin Herrenschmidt
2007-04-13 22:39                                     ` Pavel Machek
2007-04-13 23:19                                       ` Benjamin Herrenschmidt
2007-04-14  9:14                                         ` Rafael J. Wysocki
2007-04-14  9:19                                           ` Johannes Berg
2007-04-15  0:19                                             ` Benjamin Herrenschmidt
2007-04-16  7:32                                         ` Pavel Machek
2007-04-16  8:37                                           ` Johannes Berg
2007-04-16 12:47                                             ` Pavel Machek
2007-04-17  4:58                                             ` Paul Mackerras
2007-04-18  7:50                                           ` Benjamin Herrenschmidt
2007-04-13 22:47                                     ` Rafael J. Wysocki
2007-04-13 21:18                             ` Benjamin Herrenschmidt
2007-04-13 21:56                               ` Pavel Machek
2007-04-13 22:01                                 ` Johannes Berg
2007-04-13 22:24                                 ` Benjamin Herrenschmidt
2007-04-13 21:15                         ` Benjamin Herrenschmidt
2007-04-13 21:50                           ` Pavel Machek
2007-04-13 22:23                             ` Benjamin Herrenschmidt
2007-04-14 22:10                               ` David Brownell
2007-04-13 21:05             ` [PATCH v2] " Pavel Machek
2007-04-12  8:44     ` Benjamin Herrenschmidt
2007-04-17 17:18 ` [PATCH] s2ram: add arch irq disable/enable hooks Johannes Berg
2007-04-18 11:27   ` Pavel Machek

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=1176290118.14149.20.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-pm@lists.osdl.org \
    --cc=pavel@suse.cz \
    /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