[lkml]   [2011]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [linux-pm] [PATCH 04/18] x86 idle: EXPORT_SYMBOL(default_idle, pm_idle) only when APM demands it

On 04/02/2011 04:58 PM, Alan Cox wrote:
> On Sat, 02 Apr 2011 02:22:46 -0400
> Len Brown<> wrote:
>> From: Len Brown<>
>> In the long run, we don't want default_idle() or (pm_idle)() to
>> be exported outside of process.c. Start by not exporting them
>> to modules, unless the APM build demands it.
> Pointless added complexity. Why are you so determined to minimise this -
> it makes no odds to anyone.

Hi Alan,

I am not sure if I have understood you correctly but
I think one problem is that modules such as APM
save the value of pm_idle pointer, set it and restore it back.

At module init:

original_pm_idle = pm_idle;
pm_idle = apm_cpu_idle;

At module exit:

pm_idle = original_pm_idle;

There is no guarantee that the pointer stored
is still valid. I think people have problem with such
usage; see


 \ /
  Last update: 2011-04-02 14:25    [W:0.167 / U:0.276 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site