* [PATCH] powerpc: Remove modpost warning with start_secondary
@ 2008-12-03 4:32 Kumar Gala
2008-12-03 5:31 ` Nathan Lynch
2008-12-04 17:16 ` [PATCH] powerpc: Remove modpost warning with start_secondary (Modified by Milton Miller) Milton Miller
0 siblings, 2 replies; 5+ messages in thread
From: Kumar Gala @ 2008-12-03 4:32 UTC (permalink / raw)
To: linuxppc-dev
WARNING: vmlinux.o(.text+0x2aa): Section mismatch in reference from the variable __secondary_start to the function .devinit.text:start_secondary()
The function __secondary_start() references
the function __devinit start_secondary().
start_secondary gets called by __secondary_start which is in asm code so its
not marked as __devinit. Its easier to just remove the __devinit from
start_secondary than try and deal with __secondary_start.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/kernel/smp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index a59d8d7..11c835e 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -487,7 +487,7 @@ static struct device_node *cpu_to_l2cache(int cpu)
}
/* Activate a secondary processor. */
-int __devinit start_secondary(void *unused)
+int start_secondary(void *unused)
{
unsigned int cpu = smp_processor_id();
struct device_node *l2_cache;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: Remove modpost warning with start_secondary
2008-12-03 4:32 [PATCH] powerpc: Remove modpost warning with start_secondary Kumar Gala
@ 2008-12-03 5:31 ` Nathan Lynch
2008-12-03 14:48 ` Kumar Gala
2008-12-04 17:16 ` [PATCH] powerpc: Remove modpost warning with start_secondary (Modified by Milton Miller) Milton Miller
1 sibling, 1 reply; 5+ messages in thread
From: Nathan Lynch @ 2008-12-03 5:31 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
Kumar Gala wrote:
> WARNING: vmlinux.o(.text+0x2aa): Section mismatch in reference from the variable __secondary_start to the function .devinit.text:start_secondary()
> The function __secondary_start() references
> the function __devinit start_secondary().
>
> start_secondary gets called by __secondary_start which is in asm code so its
> not marked as __devinit. Its easier to just remove the __devinit from
> start_secondary than try and deal with __secondary_start.
Which just gets another mismatch warning here:
WARNING: arch/powerpc/kernel/built-in.o(.text+0x23cc4): Section mismatch in reference from the function .start_secondary() to the function .devinit.text:.smp_store_cpu_info()
The function .start_secondary() references
the function __devinit .smp_store_cpu_info().
This is often because .start_secondary lacks a __devinit
annotation or the annotation of .smp_store_cpu_info is wrong.
Isn't there a better way to address this? It doesn't seem right to
increase the kernel's memory usage to get rid of a modpost warning.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: Remove modpost warning with start_secondary
2008-12-03 5:31 ` Nathan Lynch
@ 2008-12-03 14:48 ` Kumar Gala
2008-12-03 17:43 ` Nathan Lynch
0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2008-12-03 14:48 UTC (permalink / raw)
To: Nathan Lynch; +Cc: linuxppc-dev
On Dec 2, 2008, at 11:31 PM, Nathan Lynch wrote:
> Kumar Gala wrote:
>> WARNING: vmlinux.o(.text+0x2aa): Section mismatch in reference from
>> the variable __secondary_start to the
>> function .devinit.text:start_secondary()
>> The function __secondary_start() references
>> the function __devinit start_secondary().
>>
>> start_secondary gets called by __secondary_start which is in asm
>> code so its
>> not marked as __devinit. Its easier to just remove the __devinit
>> from
>> start_secondary than try and deal with __secondary_start.
>
> Which just gets another mismatch warning here:
>
> WARNING: arch/powerpc/kernel/built-in.o(.text+0x23cc4): Section
> mismatch in reference from the function .start_secondary() to the
> function .devinit.text:.smp_store_cpu_info()
> The function .start_secondary() references
> the function __devinit .smp_store_cpu_info().
> This is often because .start_secondary lacks a __devinit
> annotation or the annotation of .smp_store_cpu_info is wrong.
>
> Isn't there a better way to address this? It doesn't seem right to
> increase the kernel's memory usage to get rid of a modpost warning.
Fair.. what defconfig did you build?
- k
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: Remove modpost warning with start_secondary
2008-12-03 14:48 ` Kumar Gala
@ 2008-12-03 17:43 ` Nathan Lynch
0 siblings, 0 replies; 5+ messages in thread
From: Nathan Lynch @ 2008-12-03 17:43 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
Kumar Gala wrote:
>
> On Dec 2, 2008, at 11:31 PM, Nathan Lynch wrote:
>
>> Kumar Gala wrote:
>>> WARNING: vmlinux.o(.text+0x2aa): Section mismatch in reference from
>>> the variable __secondary_start to the function
>>> .devinit.text:start_secondary()
>>> The function __secondary_start() references
>>> the function __devinit start_secondary().
>>>
>>> start_secondary gets called by __secondary_start which is in asm
>>> code so its
>>> not marked as __devinit. Its easier to just remove the __devinit
>>> from
>>> start_secondary than try and deal with __secondary_start.
>>
>> Which just gets another mismatch warning here:
>>
>> WARNING: arch/powerpc/kernel/built-in.o(.text+0x23cc4): Section
>> mismatch in reference from the function .start_secondary() to the
>> function .devinit.text:.smp_store_cpu_info()
>> The function .start_secondary() references
>> the function __devinit .smp_store_cpu_info().
>> This is often because .start_secondary lacks a __devinit
>> annotation or the annotation of .smp_store_cpu_info is wrong.
>>
>> Isn't there a better way to address this? It doesn't seem right to
>> increase the kernel's memory usage to get rid of a modpost warning.
>
> Fair.. what defconfig did you build?
Try ppc64_defconfig with HOTPLUG_CPU=n.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc: Remove modpost warning with start_secondary (Modified by Milton Miller)
2008-12-03 4:32 [PATCH] powerpc: Remove modpost warning with start_secondary Kumar Gala
2008-12-03 5:31 ` Nathan Lynch
@ 2008-12-04 17:16 ` Milton Miller
1 sibling, 0 replies; 5+ messages in thread
From: Milton Miller @ 2008-12-04 17:16 UTC (permalink / raw)
To: Kumar Gala; +Cc: linux-ppc, Nathan Lynch, Paul Mackerras
[oops forgot to cc the list]
Nathan Lynch wrote at 2008-12-03 17:43:40:
> Kumar Gala wrote:
>> On Dec 2, 2008, at 11:31 PM, Nathan Lynch wrote:
>>> Kumar Gala wrote:
>>>> WARNING: vmlinux.o(.text+0x2aa): Section mismatch in reference from
>>>> the variable __secondary_start to the function
>>>> .devinit.text:start_secondary()
>>>> The function __secondary_start() references
>>>> the function __devinit start_secondary().
>>>>
>>>> start_secondary gets called by __secondary_start which is in asm
>>>> code so its
>>>> not marked as __devinit. Its easier to just remove the __devinit
>>>> from
>>>> start_secondary than try and deal with __secondary_start.
>>>
>>> Which just gets another mismatch warning here:
>>>
>>> WARNING: arch/powerpc/kernel/built-in.o(.text+0x23cc4): Section
>>> mismatch in reference from the function .start_secondary() to the
>>> function .devinit.text:.smp_store_cpu_info()
>>> The function .start_secondary() references
>>> the function __devinit .smp_store_cpu_info().
>>> This is often because .start_secondary lacks a __devinit
>>> annotation or the annotation of .smp_store_cpu_info is wrong.
And other architectures want this to be cpuinit, the patch is held up
because of powerpc:
http://ozlabs.org/pipermail/linuxppc-dev/2008-November/064897.html
>>> Isn't there a better way to address this? It doesn't seem right to
>>> increase the kernel's memory usage to get rid of a modpost warning.
I agree. And its easy: move the asm code to the right section with the
nifty macros in linux/init.h.
We can use the whitelist of .text.head and also use use cpuinit.
I had a patch last July that went in this direction, but it was tangled
with the relocatable kernel patches and badly timed.
http://ozlabs.org/pipermail/linuxppc-dev/2008-July/059717.html
hmm, I don't see 1/3 that cleaned up the function entry macro repition.
I'll try to revive them and bring them up to the current tree.
>>
>> Fair.. what defconfig did you build?
>
> Try ppc64_defconfig with HOTPLUG_CPU=n.
milton
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-12-04 17:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 4:32 [PATCH] powerpc: Remove modpost warning with start_secondary Kumar Gala
2008-12-03 5:31 ` Nathan Lynch
2008-12-03 14:48 ` Kumar Gala
2008-12-03 17:43 ` Nathan Lynch
2008-12-04 17:16 ` [PATCH] powerpc: Remove modpost warning with start_secondary (Modified by Milton Miller) Milton Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).