summaryrefslogtreecommitdiff
path: root/drivers/pci/pci-driver.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2016-02-09 17:30:48 +0300
committerBjorn Helgaas <bhelgaas@google.com>2016-03-09 00:40:37 +0300
commitb4d18d71ec12f9f0ad3190b65e1a33ef1e6f8561 (patch)
tree251a4b47061ea89754fb2b32619b96d2296a0883 /drivers/pci/pci-driver.c
parent057bd2e0528ec68b3d0481ede0b26a31a9e5d2f1 (diff)
downloadlinux-b4d18d71ec12f9f0ad3190b65e1a33ef1e6f8561.tar.xz
PCI: tegra: Implement ->{add,remove}_bus() callbacks
The configuration space mapping on Tegra is somewhat special, and in order to avoid wasting virtual address space the configuration space for each bus needs to be stitched together from several blocks which form a single continuous virtual address range for accessors. Currently the configuration space is mapped upon the first access to one of its registers. However, the mapping operation may sleep under certain circumstances, so doing it from the configuration space accessors (they are protected by a spin lock) will trigger a warning. To avoid the warning, use the ->add_bus() callback to perform the mapping at enumeration time when the operation is allowed to sleep. Also add an implementation of ->remove_bus() that undoes the mapping established by the ->add_bus() callback. While it isn't currently possible to unload the module, there is work underway to remedy this, and this code will come in handy when that happens. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-driver.c')
0 files changed, 0 insertions, 0 deletions