From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: questions of cpuidle
Date: Tue, 10 Dec 2013 09:25:16 +0100 [thread overview]
Message-ID: <52A6CFEC.7010607@linaro.org> (raw)
In-Reply-To: <CAK7N6vpbrSKJvUG0ZY34Lt0CqOR=5Xaew65wJvf4paD5xB0mCg@mail.gmail.com>
On 12/10/2013 09:07 AM, anish singh wrote:
> On Mon, Dec 9, 2013 at 11:27 PM, Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>> On 12/10/2013 07:33 AM, Alex Shi wrote:
>>>
>>> On 12/09/2013 10:17 PM, Daniel Lezcano wrote:
>>>>
>>>>
>>>> Concerning the wake up of the cpu: the cpu disabled the irq and
>>>> goes to sleep, it is up to the firmware to wake up the cpu when an
>>>> interrupt occurs. It will exits its sleep state, call
>>>> clock_events_notify(EXIT), by this way re-switching to the local
>>>> timer, and then re-enabling the local interrupt which leads to the
>>>> interrupt handler.
>>>
>>>
>>> Thanks a lots for excellent article and detailed explains!
>>>
>>> So, if the firmware is in response to wake up cpu. that means there
>>> is a unit which control the firmware and it can not be power down.
>>
>>
>> Correct.
>>
>>
>>> Do you know which unit running the firmware to wake up deep idle
>>> CPU.
>>
>>
>> That depends on the SoC implementation.
> and which is intentionally kept hidden away.
>>
>> Some SoC have a "Power Management Unit". The PMU has several idle states
>> defined, each of them are described in the technical reference manual
>> (TRM) with the wake up sources.
> PMU is intentionally kept hidden by OEM companies as this way
> they protect there hardware IP.
Unfortunately yes and beside that hiding the bugs in a black box letting
the user/developer to bang its head against the walls :)
>> Some SoC don't have any PMU and the idle states are very few, keeping
>> most of the logic on.
>>
>> Some other SoC hide the PMU behind PSCI calls.
> which is intentional.
>>> And does the wake up pass via GIC to CPU? If so, does the GIC need
>>> keep awake when all cpu idle? If not, how the firmware give the
>>> interrupt to CPU? And I am wondering if the deep idle cpu voltage get
>>> to near 0. How the cpu get the interrupt signal?
>>
>>
>> If a deep idle state powers down the GIC, it is up to the PMU to proxy
>> the interrupts. When an interrupt occurs, the PMU powers up the logic,
>> including the GIC. The notifier call chain with cpu_suspend / cpu_resume
>> will save and restore the GIC registers.
>>
>> But this is hardware specific and will depend on how the PMU is
>> implemented and how far it goes in the power management.
>>
>> You have a good example in the drivers/cpuidle/cpuidle-ux500.c to
>> understand with the comments how the interrupts are handled through the
>> power management unit.
>>
>> In the Xillinx documentation available on the web [1], the chapter 24.4
>> gives the information about one kind of PMU.
>>
>> I believe the mechanism is pretty similar on all the hardware but it is
>> obfuscated by a generic power instruction like mwait.
>>
>> -- Daniel
>>
>> [1]
>> http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf
>>
>>
>>
>>>> There are some more informations in the wiki page [1].
>>>>
>>>> -- Daniel
>>>>
>>>> [1]
>>>> https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/WakeUpSources
>>>
>>>
>>>>
>>>
>>
>>
>> --
>> <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
>>
>> Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
>> <http://twitter.com/#!/linaroorg> Twitter |
>> <http://www.linaro.org/linaro-blog/> Blog
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: anish singh <anish198519851985@gmail.com>
Cc: Alex Shi <alex.shi@linaro.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
LAK <linux-arm-kernel@lists.infradead.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
preeti@linux.vnet.ibm.com,
"len.brown@intel.com" <len.brown@intel.com>
Subject: Re: questions of cpuidle
Date: Tue, 10 Dec 2013 09:25:16 +0100 [thread overview]
Message-ID: <52A6CFEC.7010607@linaro.org> (raw)
In-Reply-To: <CAK7N6vpbrSKJvUG0ZY34Lt0CqOR=5Xaew65wJvf4paD5xB0mCg@mail.gmail.com>
On 12/10/2013 09:07 AM, anish singh wrote:
> On Mon, Dec 9, 2013 at 11:27 PM, Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>> On 12/10/2013 07:33 AM, Alex Shi wrote:
>>>
>>> On 12/09/2013 10:17 PM, Daniel Lezcano wrote:
>>>>
>>>>
>>>> Concerning the wake up of the cpu: the cpu disabled the irq and
>>>> goes to sleep, it is up to the firmware to wake up the cpu when an
>>>> interrupt occurs. It will exits its sleep state, call
>>>> clock_events_notify(EXIT), by this way re-switching to the local
>>>> timer, and then re-enabling the local interrupt which leads to the
>>>> interrupt handler.
>>>
>>>
>>> Thanks a lots for excellent article and detailed explains!
>>>
>>> So, if the firmware is in response to wake up cpu. that means there
>>> is a unit which control the firmware and it can not be power down.
>>
>>
>> Correct.
>>
>>
>>> Do you know which unit running the firmware to wake up deep idle
>>> CPU.
>>
>>
>> That depends on the SoC implementation.
> and which is intentionally kept hidden away.
>>
>> Some SoC have a "Power Management Unit". The PMU has several idle states
>> defined, each of them are described in the technical reference manual
>> (TRM) with the wake up sources.
> PMU is intentionally kept hidden by OEM companies as this way
> they protect there hardware IP.
Unfortunately yes and beside that hiding the bugs in a black box letting
the user/developer to bang its head against the walls :)
>> Some SoC don't have any PMU and the idle states are very few, keeping
>> most of the logic on.
>>
>> Some other SoC hide the PMU behind PSCI calls.
> which is intentional.
>>> And does the wake up pass via GIC to CPU? If so, does the GIC need
>>> keep awake when all cpu idle? If not, how the firmware give the
>>> interrupt to CPU? And I am wondering if the deep idle cpu voltage get
>>> to near 0. How the cpu get the interrupt signal?
>>
>>
>> If a deep idle state powers down the GIC, it is up to the PMU to proxy
>> the interrupts. When an interrupt occurs, the PMU powers up the logic,
>> including the GIC. The notifier call chain with cpu_suspend / cpu_resume
>> will save and restore the GIC registers.
>>
>> But this is hardware specific and will depend on how the PMU is
>> implemented and how far it goes in the power management.
>>
>> You have a good example in the drivers/cpuidle/cpuidle-ux500.c to
>> understand with the comments how the interrupts are handled through the
>> power management unit.
>>
>> In the Xillinx documentation available on the web [1], the chapter 24.4
>> gives the information about one kind of PMU.
>>
>> I believe the mechanism is pretty similar on all the hardware but it is
>> obfuscated by a generic power instruction like mwait.
>>
>> -- Daniel
>>
>> [1]
>> http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf
>>
>>
>>
>>>> There are some more informations in the wiki page [1].
>>>>
>>>> -- Daniel
>>>>
>>>> [1]
>>>> https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/WakeUpSources
>>>
>>>
>>>>
>>>
>>
>>
>> --
>> <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
>>
>> Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
>> <http://twitter.com/#!/linaroorg> Twitter |
>> <http://www.linaro.org/linaro-blog/> Blog
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2013-12-10 8:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 13:40 questions of cpuidle Alex Shi
2013-12-09 13:40 ` Alex Shi
2013-12-09 14:17 ` Daniel Lezcano
2013-12-09 14:17 ` Daniel Lezcano
2013-12-10 6:33 ` Alex Shi
2013-12-10 6:33 ` Alex Shi
2013-12-10 7:27 ` Daniel Lezcano
2013-12-10 7:27 ` Daniel Lezcano
2013-12-10 8:07 ` anish singh
2013-12-10 8:07 ` anish singh
2013-12-10 8:25 ` Daniel Lezcano [this message]
2013-12-10 8:25 ` Daniel Lezcano
2013-12-10 8:44 ` Alex Shi
2013-12-10 8:44 ` Alex Shi
2013-12-09 15:26 ` Preeti U Murthy
2013-12-09 15:26 ` Preeti U Murthy
2013-12-10 6:08 ` Alex Shi
2013-12-10 6:08 ` Alex Shi
2013-12-10 14:53 ` Arjan van de Ven
2013-12-10 14:53 ` Arjan van de Ven
2013-12-10 15:28 ` Alex Shi
2013-12-10 15:28 ` Alex Shi
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=52A6CFEC.7010607@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.