Patchwork powerpc: Exporting boot_cpuid_phys

login
register
mail settings
Submitter Andrew Gabbasov
Date July 16, 2011, 1:22 p.m.
Message ID <4E219085.8000709@mentor.com>
Download mbox | patch
Permalink /patch/104971/
State Accepted
Commit 9974eec2b802b630aece96708349738e8d5a2cf6
Headers show

Comments

Andrew Gabbasov - July 16, 2011, 1:22 p.m.
Kernel loadable module can use hard_smp_processor_id() if building with SMP
kernel. In order to make it work for UP kernels too, boot_cpuid_phys
symbol (which is what hard_smp_processor_id() macro resolves to
in non-SMP configuration) must be exported.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
---
 arch/powerpc/kernel/setup_32.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Hollis Blanchard - July 22, 2011, 7:11 p.m.
On 07/16/2011 06:22 AM, Andrew Gabbasov wrote:
> Kernel loadable module can use hard_smp_processor_id() if building with SMP
> kernel. In order to make it work for UP kernels too, boot_cpuid_phys
> symbol (which is what hard_smp_processor_id() macro resolves to
> in non-SMP configuration) must be exported.
>
> Signed-off-by: Andrew Gabbasov<andrew_gabbasov@mentor.com>
> ---
>   arch/powerpc/kernel/setup_32.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
> index 1d2fbc9..3dffce6 100644
> --- a/arch/powerpc/kernel/setup_32.c
> +++ b/arch/powerpc/kernel/setup_32.c
> @@ -49,6 +49,7 @@ extern void bootx_init(unsigned long r4, unsigned long phys);
>   int boot_cpuid = -1;
>   EXPORT_SYMBOL_GPL(boot_cpuid);
>   int boot_cpuid_phys;
> +EXPORT_SYMBOL_GPL(boot_cpuid_phys);
>
>   int smp_hw_index[NR_CPUS];

Ben, ping?

Hollis Blanchard
Mentor Graphics, Embedded Systems Division
Kumar Gala - July 22, 2011, 8:28 p.m.
On Jul 22, 2011, at 2:11 PM, Hollis Blanchard wrote:

> On 07/16/2011 06:22 AM, Andrew Gabbasov wrote:
>> Kernel loadable module can use hard_smp_processor_id() if building with SMP
>> kernel. In order to make it work for UP kernels too, boot_cpuid_phys
>> symbol (which is what hard_smp_processor_id() macro resolves to
>> in non-SMP configuration) must be exported.
>> 
>> Signed-off-by: Andrew Gabbasov<andrew_gabbasov@mentor.com>
>> ---
>>  arch/powerpc/kernel/setup_32.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>> 
>> diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
>> index 1d2fbc9..3dffce6 100644
>> --- a/arch/powerpc/kernel/setup_32.c
>> +++ b/arch/powerpc/kernel/setup_32.c
>> @@ -49,6 +49,7 @@ extern void bootx_init(unsigned long r4, unsigned long phys);
>>  int boot_cpuid = -1;
>>  EXPORT_SYMBOL_GPL(boot_cpuid);
>>  int boot_cpuid_phys;
>> +EXPORT_SYMBOL_GPL(boot_cpuid_phys);
>> 
>>  int smp_hw_index[NR_CPUS];
> 
> Ben, ping?

Its in Benh's next branch.

- k

Patch

diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 1d2fbc9..3dffce6 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -49,6 +49,7 @@  extern void bootx_init(unsigned long r4, unsigned long phys);
 int boot_cpuid = -1;
 EXPORT_SYMBOL_GPL(boot_cpuid);
 int boot_cpuid_phys;
+EXPORT_SYMBOL_GPL(boot_cpuid_phys);
 
 int smp_hw_index[NR_CPUS];