lkml.org 
[lkml]   [2014]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/6] ARM: firmware: add prepare_idle() operation
On 02/13/2014 08:01 PM, Tomasz Figa wrote:
> Hi Alexandre,
>
> On 07.02.2014 05:35, Alexandre Courbot wrote:
>> Some firmwares do not put the CPU into idle mode themselves, but still
>> need to be informed that the CPU is about to enter idle mode before this
>> happens. Add a prepare_idle() operation to the firmware_ops structure to
>> handle such cases.
>>
>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>> ---
>> arch/arm/include/asm/firmware.h | 4 ++++
>> 1 file changed, 4 insertions(+)
>
> I wonder if .do_idle() couldn't simply return an appropriate error code
> to let the upper layer know that it should proceed with normal CPU idle
> activation, while still letting the firmware know that the CPU is going
> to idle.

In our particular case I agree it would be enough to use do_idle() to
let the firmware know about the operation and have it return -ENOSYS so
the kernel actually performs it. I'm afraid this might not fulfill all
needs though (e.g. one can imagine a firmware where the OS needs to take
action between the notification and the actual shutdown), and as Stephen
pointed out that would make the name of the function ambiguous at best.
I'd rather keep it the current way for clarity.


\
 
 \ /
  Last update: 2014-02-14 07:22    [W:0.134 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site