public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Greg KH <greg@kroah.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH,RFC] pci: do not mark exported functions as __devinit
Date: Fri, 2 Mar 2007 23:55:12 +0100	[thread overview]
Message-ID: <20070302225512.GA22555@uranus.ravnborg.org> (raw)
In-Reply-To: <20070302204752.GA24716@kroah.com>

On Fri, Mar 02, 2007 at 12:47:52PM -0800, Greg KH wrote:
> On Tue, Feb 27, 2007 at 10:27:02AM +0100, Sam Ravnborg wrote:
> > Functions marked __devinit will be removed after kernel init.
> > But being exported they are potentially called by a module
> > much later.
> > So the safer choice seems to be to keep the function even
> > in the non CONFIG_HOTPLUG case.
> > 
> > This silence the follwoing section mismatch warnings:
> > WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_device from __ksymtab_gpl between '__ksymtab_pci_bus_add_device' (at offset 0x20) and '__ksymtab_pci_walk_bus'
> > WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_create_bus from __ksymtab_gpl between '__ksymtab_pci_create_bus' (at offset 0x40) and '__ksymtab_pci_stop_bus_device'
> > WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_max_busnr from __ksymtab_gpl between '__ksymtab_pci_bus_max_busnr' (at offset 0xc0) and '__ksymtab_pci_assign_resource_fixed'
> > WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_claim_resource from __ksymtab_gpl between '__ksymtab_pci_claim_resource' (at offset 0xe0) and '__ksymtab_pcie_port_bus_type'
> > WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_devices from __ksymtab between '__ksymtab_pci_bus_add_devices' (at offset 0x70) and '__ksymtab_pci_bus_alloc_resource'
> > WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_scan_bus_parented from __ksymtab between '__ksymtab_pci_scan_bus_parented' (at offset 0x90) and '__ksymtab_pci_root_buses'
> > WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_assign_resources from __ksymtab between '__ksymtab_pci_bus_assign_resources' (at offset 0x4d0) and '__ksymtab_pci_bus_size_bridges'
> > WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_size_bridges from __ksymtab between '__ksymtab_pci_bus_size_bridges' (at offset 0x4e0) and '__ksymtab_pci_setup_cardbus'
> > 
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > ---
> > Is this the correct approach or do we allow __init symbols to be
> > exported? In that case we need to find a way to export them without
> > causing a section mismatch warning.
> 
> Yes, we allow them to be exported globally, as other init code might
> need to call them, like these functions.
> 
> So yes, I think we need to find a way to fix the warning tools, as the
> code is correct here.

OK - for now I have added code to kbuild to ignore/whitelist all EXPORT_SYMBOL*()
og functions marked __*init.
This silence the above warnings.

	Sam

  reply	other threads:[~2007-03-02 22:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-27  9:27 [PATCH,RFC] pci: do not mark exported functions as __devinit Sam Ravnborg
2007-03-02 20:47 ` Greg KH
2007-03-02 22:55   ` Sam Ravnborg [this message]
2007-03-02 22:59   ` [PATCH] pci: fix section mismatch warning Sam Ravnborg
2007-03-02 23:27     ` patch pci-fix-section-mismatch-warning.patch added to gregkh-2.6 tree gregkh
2007-03-02 23:02   ` [PATCH,RFC] pci: do not mark exported functions as __devinit Sam Ravnborg
2007-03-02 23:34     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070302225512.GA22555@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox