Bug 13228

Summary: powerpc: Section mismatch: pcibios_finish_adding_to_bus pcibios_claim_one_bus
Product: Platform Specific/Hardware Reporter: Jeremy Huddleston (jeremyhu)
Component: PPC-64Assignee: Tony Breeds (tony)
Status: RESOLVED CODE_FIX    
Severity: normal CC: alan, benh, tony
Priority: P1    
Hardware: PPC-64   
OS: Linux   
Kernel Version: 2.6.29.2, 2.6.30-rc4 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: config for 2.6.29.2
pcibios_finish_adding_to_bus_devinit.patch

Description Jeremy Huddleston 2009-05-03 07:51:40 UTC
Created attachment 21195 [details]
config for 2.6.29.2

I have seen this section mismatch using 2.6.29.2 vanilla and recent git (around 2.6.30-rc4 right now).  2.6.28.y does not exhibit this problem.

The following warning appears during this build.  This is copied from my build log for 2.6.29.2, but the same message appears in linux-2.6.git.

  LD      arch/powerpc/kernel/built-in.o
WARNING: arch/powerpc/kernel/built-in.o(.text+0x1217c): Section mismatch in reference from the function pcibios_finish_adding_to_bus() to the function .devinit.text:pcibios_claim_one_bus()
The function pcibios_finish_adding_to_bus() references
the function __devinit pcibios_claim_one_bus().
This is often because pcibios_finish_adding_to_bus lacks a __devinit 
annotation or the annotation of pcibios_claim_one_bus is wrong.
Comment 1 Jeremy Huddleston 2009-05-03 08:02:55 UTC
Created attachment 21196 [details]
pcibios_finish_adding_to_bus_devinit.patch

Patch to add __devinit
Comment 2 Alan 2009-05-21 18:57:17 UTC
That appears to then break the rpadlpar_core driver code...
Comment 3 Alan 2009-05-21 18:58:05 UTC
(reassigning as this looks like a real bug)
Comment 4 Tony Breeds 2009-06-04 23:45:34 UTC
A fix for this is included in the powerpc-next tree:
http://git.kernel.org/?p=linux/kernel/git/benh/powerpc.git;a=commit;h=baf75b0a42a1b3f6fca80f8949b6141eaff61b0d