Messages in this thread | | | Date | Sat, 02 Apr 2011 17:51:55 +0530 | From | Trinabh Gupta <> | Subject | Re: [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<lenb@kernel.org> wrote: > >> From: Len Brown<len.brown@intel.com> >> >> 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 http://lkml.org/lkml/2009/8/28/50
Thanks, -Trinabh
| |