Re: [linux-pm] [PATCH 04/18] x86 idle: EXPORT_SYMBOL(default_idle,pm_idle) only when APM demands it
From: Trinabh Gupta
Date: Sat Apr 02 2011 - 08:22:16 EST
On 04/02/2011 04:58 PM, Alan Cox wrote:
On Sat, 02 Apr 2011 02:22:46 -0400
Len Brown<lenb@xxxxxxxxxx> wrote:
From: Len Brown<len.brown@xxxxxxxxx>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/