Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b4d18d71 authored by Thierry Reding's avatar Thierry Reding Committed by Bjorn Helgaas
Browse files

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: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 057bd2e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment