* [RFC PATCH] ARM: Export the CPU logical map to modules
@ 2013-01-28 17:34 Dave Martin
2013-02-07 12:22 ` Dave Martin
0 siblings, 1 reply; 4+ messages in thread
From: Dave Martin @ 2013-01-28 17:34 UTC (permalink / raw)
To: linux-arm-kernel
It is reasonable for loadable modules to be CPU topology aware
(particular examples include cpufreq and cpuidle drivers).
This patch exports __cpu_logical_map, so that modules can use the
cpu_logical_map() interface declared in <asm/smp_plat.h>.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
---
If anyone has a strong view on whether this should be
EXPORT_SYMBOL_GPL(), I don't have a problem with changing
that. I'm not sure of the precise etiquette here.
Certainly this does not feel like a very "public" interface.
Perhaps we should wrap this in a real function for export
to modules, rather than encouraging them to poke the
__cpu_logical_map[] array (albeit via a predefined macro).
arch/arm/kernel/setup.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 3f6cbb2..1b9e5bf 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -428,6 +428,7 @@ void cpu_init(void)
}
int __cpu_logical_map[NR_CPUS];
+EXPORT_SYMBOL(__cpu_logical_map);
void __init smp_setup_processor_id(void)
{
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [RFC PATCH] ARM: Export the CPU logical map to modules
2013-01-28 17:34 [RFC PATCH] ARM: Export the CPU logical map to modules Dave Martin
@ 2013-02-07 12:22 ` Dave Martin
2013-02-07 20:05 ` Nicolas Pitre
0 siblings, 1 reply; 4+ messages in thread
From: Dave Martin @ 2013-02-07 12:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Does anyone have a comment on this?
Cheers
---Dave
On Mon, Jan 28, 2013 at 05:34:04PM +0000, Dave Martin wrote:
> It is reasonable for loadable modules to be CPU topology aware
> (particular examples include cpufreq and cpuidle drivers).
>
> This patch exports __cpu_logical_map, so that modules can use the
> cpu_logical_map() interface declared in <asm/smp_plat.h>.
>
> Signed-off-by: Dave Martin <dave.martin@linaro.org>
> ---
> If anyone has a strong view on whether this should be
> EXPORT_SYMBOL_GPL(), I don't have a problem with changing
> that. I'm not sure of the precise etiquette here.
> Certainly this does not feel like a very "public" interface.
>
> Perhaps we should wrap this in a real function for export
> to modules, rather than encouraging them to poke the
> __cpu_logical_map[] array (albeit via a predefined macro).
>
>
> arch/arm/kernel/setup.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index 3f6cbb2..1b9e5bf 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -428,6 +428,7 @@ void cpu_init(void)
> }
>
> int __cpu_logical_map[NR_CPUS];
> +EXPORT_SYMBOL(__cpu_logical_map);
>
> void __init smp_setup_processor_id(void)
> {
> --
> 1.7.4.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [RFC PATCH] ARM: Export the CPU logical map to modules
2013-02-07 12:22 ` Dave Martin
@ 2013-02-07 20:05 ` Nicolas Pitre
2013-02-08 11:33 ` Dave Martin
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Pitre @ 2013-02-07 20:05 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 7 Feb 2013, Dave Martin wrote:
> Hi,
>
> Does anyone have a comment on this?
As you say, I'd be tempted to export some accessor with well defined
semantic meaning instead.
>
> Cheers
> ---Dave
>
> On Mon, Jan 28, 2013 at 05:34:04PM +0000, Dave Martin wrote:
> > It is reasonable for loadable modules to be CPU topology aware
> > (particular examples include cpufreq and cpuidle drivers).
> >
> > This patch exports __cpu_logical_map, so that modules can use the
> > cpu_logical_map() interface declared in <asm/smp_plat.h>.
> >
> > Signed-off-by: Dave Martin <dave.martin@linaro.org>
> > ---
> > If anyone has a strong view on whether this should be
> > EXPORT_SYMBOL_GPL(), I don't have a problem with changing
> > that. I'm not sure of the precise etiquette here.
> > Certainly this does not feel like a very "public" interface.
> >
> > Perhaps we should wrap this in a real function for export
> > to modules, rather than encouraging them to poke the
> > __cpu_logical_map[] array (albeit via a predefined macro).
> >
> >
> > arch/arm/kernel/setup.c | 1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> > index 3f6cbb2..1b9e5bf 100644
> > --- a/arch/arm/kernel/setup.c
> > +++ b/arch/arm/kernel/setup.c
> > @@ -428,6 +428,7 @@ void cpu_init(void)
> > }
> >
> > int __cpu_logical_map[NR_CPUS];
> > +EXPORT_SYMBOL(__cpu_logical_map);
> >
> > void __init smp_setup_processor_id(void)
> > {
> > --
> > 1.7.4.1
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [RFC PATCH] ARM: Export the CPU logical map to modules
2013-02-07 20:05 ` Nicolas Pitre
@ 2013-02-08 11:33 ` Dave Martin
0 siblings, 0 replies; 4+ messages in thread
From: Dave Martin @ 2013-02-08 11:33 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Feb 07, 2013 at 03:05:03PM -0500, Nicolas Pitre wrote:
> On Thu, 7 Feb 2013, Dave Martin wrote:
>
> > Hi,
> >
> > Does anyone have a comment on this?
>
> As you say, I'd be tempted to export some accessor with well defined
> semantic meaning instead.
I think I agree...
Modules definitely shouldn't easily be able to write cpu_logical_map.
I'll rework something and repost.
Cheers
---Dave
>
>
>
> >
> > Cheers
> > ---Dave
> >
> > On Mon, Jan 28, 2013 at 05:34:04PM +0000, Dave Martin wrote:
> > > It is reasonable for loadable modules to be CPU topology aware
> > > (particular examples include cpufreq and cpuidle drivers).
> > >
> > > This patch exports __cpu_logical_map, so that modules can use the
> > > cpu_logical_map() interface declared in <asm/smp_plat.h>.
> > >
> > > Signed-off-by: Dave Martin <dave.martin@linaro.org>
> > > ---
> > > If anyone has a strong view on whether this should be
> > > EXPORT_SYMBOL_GPL(), I don't have a problem with changing
> > > that. I'm not sure of the precise etiquette here.
> > > Certainly this does not feel like a very "public" interface.
> > >
> > > Perhaps we should wrap this in a real function for export
> > > to modules, rather than encouraging them to poke the
> > > __cpu_logical_map[] array (albeit via a predefined macro).
> > >
> > >
> > > arch/arm/kernel/setup.c | 1 +
> > > 1 files changed, 1 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> > > index 3f6cbb2..1b9e5bf 100644
> > > --- a/arch/arm/kernel/setup.c
> > > +++ b/arch/arm/kernel/setup.c
> > > @@ -428,6 +428,7 @@ void cpu_init(void)
> > > }
> > >
> > > int __cpu_logical_map[NR_CPUS];
> > > +EXPORT_SYMBOL(__cpu_logical_map);
> > >
> > > void __init smp_setup_processor_id(void)
> > > {
> > > --
> > > 1.7.4.1
> > >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-08 11:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-28 17:34 [RFC PATCH] ARM: Export the CPU logical map to modules Dave Martin
2013-02-07 12:22 ` Dave Martin
2013-02-07 20:05 ` Nicolas Pitre
2013-02-08 11:33 ` Dave Martin
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.