lkml.org 
[lkml]   [2015]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v3 2/3] pci: iproc: Add Broadcom iProc PCIe support
    Date
    On Friday 06 March 2015 10:00:34 Ray Jui wrote:
    > >
    >
    > Although I have not tested it, but to my best knowledge there shouldn't
    > be any technical issue by making the PCIe iProc driver a loadable module
    > and installing the module later after the kernel finishes booting.
    >
    > But I wonder why I haven't seen any PCIe host driver being allowed to be
    > compiled as module? Maybe there's no obvious benefit of doing that.
    > People typically opt to load slave devices as module but tend to keep
    > the bus or host devices compiled in.
    >
    > And to allow a PCI host driver to be compiled as module, some PCI
    > functions need to have their symbols exported:
    >
    > ERROR: "pci_common_swizzle" [drivers/pci/host/pcie-iproc.ko] undefined!
    > ERROR: "pci_fixup_irqs" [drivers/pci/host/pcie-iproc.ko] undefined!
    > ERROR: "pci_assign_unassigned_bus_resources"
    > [drivers/pci/host/pcie-iproc.ko] undefined!
    > ERROR: "pci_remove_root_bus" [drivers/pci/host/pcie-iproc.ko] undefined!
    > ERROR: "pci_stop_root_bus" [drivers/pci/host/pcie-iproc.ko] undefined!
    > ERROR: "pci_create_root_bus" [drivers/pci/host/pcie-iproc.ko] undefined!
    >
    > Maybe Bjorn can help to shed some light here? Should I go ahead and
    > export_symbol these PCI functions and make the iProc PCI driver "tristate"?

    My best guess is that no loadable driver ever tried to use these and
    we should indeed just export them.

    The call to pci_assign_unassigned_bus_resources could be avoided by using
    pci_rescan_bus(), which would simplify the driver a little, but for
    some reason, nothing else uses that, so I'm not sure about it.

    The pci_remove_root_bus/pci_stop_root_bus calls are rarely used anywhere
    else. Are they functional to the point where you could unload a pci
    host driver that is a loadable module? If so, that would be
    wonderful.

    Arnd


    \
     
     \ /
      Last update: 2015-03-09 13:41    [W:3.138 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site