From: olof@lixom.net (Olof Johansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] PCI: pcie-designware: allow drivers as loadable modules
Date: Mon, 25 Aug 2014 19:56:02 -0700 [thread overview]
Message-ID: <CAOesGMgJtP-A9x_OSAkGd9HNPt9sTCtDQJJ1BZMmuQZm-nZoUg@mail.gmail.com> (raw)
In-Reply-To: <20140813172155.GB7298@google.com>
On Wed, Aug 13, 2014 at 10:21 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Thu, Jul 24, 2014 at 11:17:45AM +0200, Arnd Bergmann wrote:
>> From 0ee79c7451851a34e5a7c33eb6020befcdcb2b24 Mon Sep 17 00:00:00 2001
>> From: Arnd Bergmann <arnd@arndb.de>
>> Date: Thu, 24 Jul 2014 11:12:48 +0200
>> Subject: [PATCH] PCI: pcie-designware: allow drivers as loadable modules
>>
>> The new pcie-spear13xx driver uses the pcie-designware library
>> and in the current form it can be built as a loadable module.
>> However, the functions it uses from the base driver are not exported,
>> so this results in a build failure and a module that can never
>> be loaded:
>>
>> ERROR: "dw_pcie_host_init" [drivers/pci/host/pcie-spear13xx.ko] undefined!
>> ERROR: "dw_handle_msi_irq" [drivers/pci/host/pcie-spear13xx.ko] undefined!
>> ERROR: "dw_pcie_msi_init" [drivers/pci/host/pcie-spear13xx.ko] undefined!
>> ERROR: "dw_pcie_cfg_write" [drivers/pci/host/pcie-spear13xx.ko] undefined!
>> ERROR: "dw_pcie_cfg_read" [drivers/pci/host/pcie-spear13xx.ko] undefined!
>> ERROR: "dw_pcie_setup_rc" [drivers/pci/host/pcie-spear13xx.ko] undefined!
>> ERROR: "dw_pcie_link_up" [drivers/pci/host/pcie-spear13xx.ko] undefined!
>>
>> If we want to allow loadable pcie-designware drivers, we have to
>> export all those symbols and ensure none of them are marked as __init.
>> This also requires making pci_assign_unassigned_resources available
>> after boot.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>> If we don't want this patch for some reason, we should instead mark
>> this driver 'bool' in Kconfig, so it becomes impossible to encounter
>> this build error.
>
> I'm not opposed to doing this, but I applied Sachin's patch that changes
> the Kconfig option to bool, so I'll drop this one for now.
Hi Bjorn,
Are you going to send this as a 3.17 fix, or is it queued only for
3.18? The former would be preferrable here.
-Olof
next prev parent reply other threads:[~2014-08-26 2:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 9:17 [RFC] PCI: pcie-designware: allow drivers as loadable modules Arnd Bergmann
2014-07-24 10:02 ` Lucas Stach
2014-08-13 17:21 ` Bjorn Helgaas
2014-08-26 2:56 ` Olof Johansson [this message]
2014-08-26 2:57 ` Olof Johansson
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=CAOesGMgJtP-A9x_OSAkGd9HNPt9sTCtDQJJ1BZMmuQZm-nZoUg@mail.gmail.com \
--to=olof@lixom.net \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).