* Support for low power mode for powerpc processors
@ 2008-07-03 18:54 prodyut hazarika
2008-07-03 19:16 ` Josh Boyer
0 siblings, 1 reply; 5+ messages in thread
From: prodyut hazarika @ 2008-07-03 18:54 UTC (permalink / raw)
To: linuxppc-dev
Hi all,
I would like to know whether Linux on PowerPC puts the processor on
low power mode during idle state. Most PowerPC processors support a
low power mode. I am looking to add support for low-power mode in
Linux for AMCC 4xx processors.
My questions are the following:
1) Is tickless kernel integrated into the PowerPC tree?
2) Does Linux kernel puts the processor in low power mode if cpu is
idle, and takes it out of that state on wakeup (triggered by
interrupt/WOL etc)?
Any suggestions/comments would be welcome.
Thanks,
Prodyut
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Support for low power mode for powerpc processors
2008-07-03 18:54 Support for low power mode for powerpc processors prodyut hazarika
@ 2008-07-03 19:16 ` Josh Boyer
2008-07-03 19:52 ` prodyut hazarika
0 siblings, 1 reply; 5+ messages in thread
From: Josh Boyer @ 2008-07-03 19:16 UTC (permalink / raw)
To: prodyut hazarika; +Cc: linuxppc-dev
On Thu, 3 Jul 2008 11:54:33 -0700
"prodyut hazarika" <prodyuth@gmail.com> wrote:
> Hi all,
> I would like to know whether Linux on PowerPC puts the processor on
> low power mode during idle state. Most PowerPC processors support a
> low power mode. I am looking to add support for low-power mode in
> Linux for AMCC 4xx processors.
>
> My questions are the following:
> 1) Is tickless kernel integrated into the PowerPC tree?
> 2) Does Linux kernel puts the processor in low power mode if cpu is
> idle, and takes it out of that state on wakeup (triggered by
> interrupt/WOL etc)?
>
> Any suggestions/comments would be welcome.
The 4xx cores themselves are designed to have power savings without
explicit software management. The only sort of "NAP/DOZE" possible
from software on them is to use the Wait Enable state in the idle loop
to stall the CPU pipelines and wait for an exception. This is already
done in more recent kernels, and it doesn't particularly save a lot of
power as the clocks and other logic are still all active.
Some chips may have an external clock and power management ASIC that
can be leverage but it will be SoC specific. You could start there for
a particular board.
josh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Support for low power mode for powerpc processors
2008-07-03 19:16 ` Josh Boyer
@ 2008-07-03 19:52 ` prodyut hazarika
2008-07-03 23:42 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 5+ messages in thread
From: prodyut hazarika @ 2008-07-03 19:52 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
But a lot of SoC like 440GT/EX support two modes of power save -
- Cut off power to other cores like PCIExpress/USB/MAC/UART etc
- Lower the CPU frequency
Is it possible to scale down CPU freq or cut off power to unused cores
while the CPU is idle? The ideal way would be that the SoC registers a
set of handlers to the Kernel that can power off/up the SoC components
or reduce/restore CPU frequency. Does any such framework exist for
PowerPC processors, because most PowerPC based SoC (FreeScale/AMCC
etc) support the above two modes of power save.
On 7/3/08, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> On Thu, 3 Jul 2008 11:54:33 -0700
> "prodyut hazarika" <prodyuth@gmail.com> wrote:
>
> > Hi all,
> > I would like to know whether Linux on PowerPC puts the processor on
> > low power mode during idle state. Most PowerPC processors support a
> > low power mode. I am looking to add support for low-power mode in
> > Linux for AMCC 4xx processors.
> >
> > My questions are the following:
> > 1) Is tickless kernel integrated into the PowerPC tree?
> > 2) Does Linux kernel puts the processor in low power mode if cpu is
> > idle, and takes it out of that state on wakeup (triggered by
> > interrupt/WOL etc)?
> >
> > Any suggestions/comments would be welcome.
>
> The 4xx cores themselves are designed to have power savings without
> explicit software management. The only sort of "NAP/DOZE" possible
> from software on them is to use the Wait Enable state in the idle loop
> to stall the CPU pipelines and wait for an exception. This is already
> done in more recent kernels, and it doesn't particularly save a lot of
> power as the clocks and other logic are still all active.
>
> Some chips may have an external clock and power management ASIC that
> can be leverage but it will be SoC specific. You could start there for
> a particular board.
>
> josh
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Support for low power mode for powerpc processors
2008-07-03 19:52 ` prodyut hazarika
@ 2008-07-03 23:42 ` Benjamin Herrenschmidt
2008-07-07 15:27 ` Josh Boyer
0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2008-07-03 23:42 UTC (permalink / raw)
To: prodyut hazarika; +Cc: linuxppc-dev
On Thu, 2008-07-03 at 12:52 -0700, prodyut hazarika wrote:
> But a lot of SoC like 440GT/EX support two modes of power save -
> - Cut off power to other cores like PCIExpress/USB/MAC/UART etc
> - Lower the CPU frequency
>
> Is it possible to scale down CPU freq or cut off power to unused cores
> while the CPU is idle? The ideal way would be that the SoC registers a
> set of handlers to the Kernel that can power off/up the SoC components
> or reduce/restore CPU frequency. Does any such framework exist for
> PowerPC processors, because most PowerPC based SoC (FreeScale/AMCC
> etc) support the above two modes of power save.
Cutting off power to individual cores should be done by the drivers for
those cores (let's call the devices). For example, the USB driver could
cut of power when nothing is connected, though I'm not sure if it can do
that without losing the ability to detect new connections, but then, USB
has a suspend state that should make it mostly unnecessary. For the
UART, you may lose the ability to receive.
At the end of the day, if you don't use at all a core, disable it from
your firmware and set it as unused in the device-tree.
Ben.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Support for low power mode for powerpc processors
2008-07-03 23:42 ` Benjamin Herrenschmidt
@ 2008-07-07 15:27 ` Josh Boyer
0 siblings, 0 replies; 5+ messages in thread
From: Josh Boyer @ 2008-07-07 15:27 UTC (permalink / raw)
To: prodyut hazarika; +Cc: linuxppc-dev
On Fri, 04 Jul 2008 09:42:51 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Thu, 2008-07-03 at 12:52 -0700, prodyut hazarika wrote:
> > But a lot of SoC like 440GT/EX support two modes of power save -
> > - Cut off power to other cores like PCIExpress/USB/MAC/UART etc
> > - Lower the CPU frequency
> >
> > Is it possible to scale down CPU freq or cut off power to unused cores
> > while the CPU is idle? The ideal way would be that the SoC registers a
> > set of handlers to the Kernel that can power off/up the SoC components
> > or reduce/restore CPU frequency. Does any such framework exist for
> > PowerPC processors, because most PowerPC based SoC (FreeScale/AMCC
> > etc) support the above two modes of power save.
>
> Cutting off power to individual cores should be done by the drivers for
> those cores (let's call the devices). For example, the USB driver could
> cut of power when nothing is connected, though I'm not sure if it can do
> that without losing the ability to detect new connections, but then, USB
> has a suspend state that should make it mostly unnecessary. For the
> UART, you may lose the ability to receive.
>
> At the end of the day, if you don't use at all a core, disable it from
> your firmware and set it as unused in the device-tree.
Right.
To answer the "can the CPU frequency be scaled" question, the answer is
"maybe". You certainly want to make sure that timebase stays constant
in those transitions, which is easiest to do if timebase is driven by
an external clock and not the CPU clock.
There are also PLB/OPB divisor ratios that have to be taken into
account when changing the CPU frequency. If the hardware can handle
this for you, then it should work well enough. I know of at least one
4xx chip that has had CPU frequency scaling working.
If you pursue this at all, you will want to do it as a cpufreq driver.
That will allow you to use the generic cpufreq infrastructure in the
kernel, including the governors.
josh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-07-07 15:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03 18:54 Support for low power mode for powerpc processors prodyut hazarika
2008-07-03 19:16 ` Josh Boyer
2008-07-03 19:52 ` prodyut hazarika
2008-07-03 23:42 ` Benjamin Herrenschmidt
2008-07-07 15:27 ` Josh Boyer
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).