linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* section mismatch for acpi_unmap_lsapic()
@ 2012-09-14 16:38 Jerry Snitselaar
  2012-09-17 11:07 ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Jerry Snitselaar @ 2012-09-14 16:38 UTC (permalink / raw)
  To: x86, linux-kernel, mingo

Commit 13ad20c1 "x86 cpu_hotplug: unmap cpu2node when the cpu is
hotremoved" in linux-next added code to acpi_unmap_lsapic() that
causes section mismatch warnings:

WARNING: vmlinux.o(.text+0x694f2): Section mismatch in reference from the function acpi_unmap_lsapic()
	  to the function .cpuinit.text:numa_clear_node()
WARNING: vmlinux.o(.text+0x694eb): Section mismatch in reference from the function acpi_unmap_lsapic() 
	  to the variable .cpuinit.data:__apicid_to_node


Does acpi_unmap_lsapic() need a wrapper like the one that was made for
acpi_map_lsapic() or can it just be annotated __ref ? I guess my
question is would be there be a reason that the wrapper was created
for acpi_map_lsapic() instead of just annotating __ref besides
allowing the code for _apic_map_lsapic() to be dropped when
HOTPLUG_CPU wasn't configured?

Jerry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: section mismatch for acpi_unmap_lsapic()
  2012-09-14 16:38 section mismatch for acpi_unmap_lsapic() Jerry Snitselaar
@ 2012-09-17 11:07 ` Ingo Molnar
  2012-09-18  1:40   ` Wen Congyang
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2012-09-17 11:07 UTC (permalink / raw)
  To: x86, linux-kernel, mingo, Andrew Morton, Wen Congyang


* Jerry Snitselaar <dev@snitselaar.org> wrote:

> Commit 13ad20c1 "x86 cpu_hotplug: unmap cpu2node when the cpu is
> hotremoved" in linux-next added code to acpi_unmap_lsapic() that
> causes section mismatch warnings:
> 
> WARNING: vmlinux.o(.text+0x694f2): Section mismatch in reference from the function acpi_unmap_lsapic()
> 	  to the function .cpuinit.text:numa_clear_node()
> WARNING: vmlinux.o(.text+0x694eb): Section mismatch in reference from the function acpi_unmap_lsapic() 
> 	  to the variable .cpuinit.data:__apicid_to_node
> 
> 
> Does acpi_unmap_lsapic() need a wrapper like the one that was made for
> acpi_map_lsapic() or can it just be annotated __ref ? I guess my
> question is would be there be a reason that the wrapper was created
> for acpi_map_lsapic() instead of just annotating __ref besides
> allowing the code for _apic_map_lsapic() to be dropped when
> HOTPLUG_CPU wasn't configured?

That commit comes from -mm AFAICS. Involved parties Cc:-ed.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: section mismatch for acpi_unmap_lsapic()
  2012-09-17 11:07 ` Ingo Molnar
@ 2012-09-18  1:40   ` Wen Congyang
  2012-09-18 19:50     ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Wen Congyang @ 2012-09-18  1:40 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: x86, linux-kernel, mingo, Andrew Morton

At 09/17/2012 07:07 PM, Ingo Molnar Wrote:
> 
> * Jerry Snitselaar <dev@snitselaar.org> wrote:
> 
>> Commit 13ad20c1 "x86 cpu_hotplug: unmap cpu2node when the cpu is
>> hotremoved" in linux-next added code to acpi_unmap_lsapic() that
>> causes section mismatch warnings:
>>
>> WARNING: vmlinux.o(.text+0x694f2): Section mismatch in reference from the function acpi_unmap_lsapic()
>> 	  to the function .cpuinit.text:numa_clear_node()
>> WARNING: vmlinux.o(.text+0x694eb): Section mismatch in reference from the function acpi_unmap_lsapic() 
>> 	  to the variable .cpuinit.data:__apicid_to_node
>>
>>
>> Does acpi_unmap_lsapic() need a wrapper like the one that was made for
>> acpi_map_lsapic() or can it just be annotated __ref ? I guess my
>> question is would be there be a reason that the wrapper was created
>> for acpi_map_lsapic() instead of just annotating __ref besides
>> allowing the code for _apic_map_lsapic() to be dropped when
>> HOTPLUG_CPU wasn't configured?
> 
> That commit comes from -mm AFAICS. Involved parties Cc:-ed.

Sorry for introducing this warning. numa_clear_node() is in cpuinit
section, and it will be called in acpi_unmap_lsapic(), so I agree
to add __ref to this function. Should I need to post another patch
to fix it or just update the patch?

Thanks
Wen Congyang

> 
> Thanks,
> 
> 	Ingo
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: section mismatch for acpi_unmap_lsapic()
  2012-09-18  1:40   ` Wen Congyang
@ 2012-09-18 19:50     ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2012-09-18 19:50 UTC (permalink / raw)
  To: Wen Congyang; +Cc: Ingo Molnar, x86, linux-kernel, mingo

On Tue, 18 Sep 2012 09:40:51 +0800
Wen Congyang <wency@cn.fujitsu.com> wrote:

> At 09/17/2012 07:07 PM, Ingo Molnar Wrote:
> > 
> > * Jerry Snitselaar <dev@snitselaar.org> wrote:
> > 
> >> Commit 13ad20c1 "x86 cpu_hotplug: unmap cpu2node when the cpu is
> >> hotremoved" in linux-next added code to acpi_unmap_lsapic() that
> >> causes section mismatch warnings:
> >>
> >> WARNING: vmlinux.o(.text+0x694f2): Section mismatch in reference from the function acpi_unmap_lsapic()
> >> 	  to the function .cpuinit.text:numa_clear_node()
> >> WARNING: vmlinux.o(.text+0x694eb): Section mismatch in reference from the function acpi_unmap_lsapic() 
> >> 	  to the variable .cpuinit.data:__apicid_to_node
> >>
> >>
> >> Does acpi_unmap_lsapic() need a wrapper like the one that was made for
> >> acpi_map_lsapic() or can it just be annotated __ref ? I guess my
> >> question is would be there be a reason that the wrapper was created
> >> for acpi_map_lsapic() instead of just annotating __ref besides
> >> allowing the code for _apic_map_lsapic() to be dropped when
> >> HOTPLUG_CPU wasn't configured?
> > 
> > That commit comes from -mm AFAICS. Involved parties Cc:-ed.
> 
> Sorry for introducing this warning. numa_clear_node() is in cpuinit
> section, and it will be called in acpi_unmap_lsapic(), so I agree
> to add __ref to this function. Should I need to post another patch
> to fix it or just update the patch?

Either a new patch or a fixup is OK for me (I'll turn a new patch into
a fixup so I and others can see what changed).

People who run git trees prefer fixup patches due to extensive lameness.

I did this:

--- a/arch/x86/kernel/acpi/boot.c~cpu_hotplug-unmap-cpu2node-when-the-cpu-is-hotremoved-fix
+++ a/arch/x86/kernel/acpi/boot.c
@@ -689,7 +689,7 @@ int __ref acpi_map_lsapic(acpi_handle ha
 }
 EXPORT_SYMBOL(acpi_map_lsapic);
 
-int acpi_unmap_lsapic(int cpu)
+int __ref acpi_unmap_lsapic(int cpu)
 {
 #ifdef CONFIG_ACPI_NUMA
 	set_apicid_to_node(per_cpu(x86_cpu_to_apicid, cpu), NUMA_NO_NODE);
_


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-18 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-14 16:38 section mismatch for acpi_unmap_lsapic() Jerry Snitselaar
2012-09-17 11:07 ` Ingo Molnar
2012-09-18  1:40   ` Wen Congyang
2012-09-18 19:50     ` Andrew Morton

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).