public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: moreau francis <francis_moreau2000@yahoo.fr>
Cc: linux-pm@lists.osdl.org, linux-kernel@vger.kernel.org
Subject: Re: Re : Re : [HELP] Power management for embedded system
Date: Thu, 24 Aug 2006 22:56:50 +0100	[thread overview]
Message-ID: <20060824215650.GB21439@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20060824105743.60250.qmail@web25811.mail.ukl.yahoo.com>

On Thu, Aug 24, 2006 at 10:57:43AM +0000, moreau francis wrote:
> Russell King wrote:
> > On Thu, Aug 24, 2006 at 09:37:39AM +0000, moreau francis wrote:
> >> Russell King wrote:
> >>> On Thu, Aug 24, 2006 at 08:44:25AM +0000, moreau francis wrote:
> >>>> It doesn't seem that APM is something really stable and finished.
> >>> It's complete.  It's purpose is to provide the interface to userland so
> >>> that programs know about suspend/resume events, and can initiate suspends.
> >>> Eg, the X server.
> >>>
> >> Is there something specific to ARM in this implementation ? I don't think
> >> so and it's surely the reason why MIPS did copy it with almost no changes.
> > 
> > MIPS copied it because presumably it was useful for them.
> 
> Actually my point is that it could be usefull for _all_ embedded systems,
> whatever the arches it comes from, couldn't it ?

Yes, I agree, it should be.

> >> why not making it the common power management for embedded system that
> >> could be used by all arches which need it ?
> > 
> > It could well become a common interface.  But it is NOT power management
> > infrastructure.  It is merely a _userland_ interface.  Nothing more.  It
> > does not do anything other than that.
> 
> apm_queue_event() (and kapmd) doens't seem something usefull for user space.
> It seems to be designed to be used by the kernel no ?

We have some folk who want a method to trigger emergency suspends when
batteries got low, or if you move the battery cover, etc.  These are
events which require fast reactions from the system, and coding up some
additional interface to pass such events to userland, have some daemon
running to monitor for those events, and issue a PM event is completely
overkill and, actually, unreliable.

> >> BTW, why has apm_cpu_idle() logic been removed from ARM implementation ?
> > 
> > This APM is just a userland interface.  It has nothing to do with actual
> > power management.  CPU idling is handled entirely differently on ARM.
> 
> Could you point out where it is handled ?

It's both machine class and CPU specific.  I couldn't point you at
anything specific, except to say that different machines and ARM CPUs
handle it differently.

Some CPUs have "wait for interrupt" instructions, some don't.  Some
need special cache handling around this instruction, some don't.  Some
machines have a CPU capable of "wait for interrupt" but must not use it.

It's all handled by the CPU abstraction, and the machine class abstraction.

See arch_idle in include/asm-arm/arch-*/system.h as the starting point
for the "default" (== always used) idle implementations.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2006-08-24 21:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-24  8:44 [HELP] Power management for embedded system moreau francis
2006-08-24  9:04 ` Russell King
2006-08-24  9:37   ` Re : " moreau francis
2006-08-24 10:11     ` Russell King
2006-08-24 10:57       ` Re : " moreau francis
2006-08-24 21:56         ` Russell King [this message]
2006-08-25 13:39           ` Re : " moreau francis
2006-08-25 13:46             ` Russell King
2006-08-24 10:12     ` Richard Purdie
2006-08-24 14:42       ` Re : " moreau francis
2006-08-24 16:20       ` Matthew Garrett
2006-08-25 13:18         ` Re : " moreau francis
2006-08-25 13:29           ` Matthew Garrett
2006-09-04 21:56         ` Pavel Machek
2006-08-24 10:28 ` Ralf Baechle

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=20060824215650.GB21439@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=francis_moreau2000@yahoo.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.osdl.org \
    /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