aboutsummaryrefslogtreecommitdiff
path: root/hw/phb3.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2017-06-06 08:59:17 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-06 20:49:05 +1000
commitacd94a9c7c589e36db013c026b5910d24af26bab (patch)
tree86fcd295abaa087d58746ecb00e79226672a5780 /hw/phb3.c
parent25897895a076471dc4566671fda5cf7d2a2c3379 (diff)
downloadskiboot-acd94a9c7c589e36db013c026b5910d24af26bab.zip
skiboot-acd94a9c7c589e36db013c026b5910d24af26bab.tar.gz
skiboot-acd94a9c7c589e36db013c026b5910d24af26bab.tar.bz2
pci: Add bitmap to know if a pci device has cfg reg filters
This avoids doing a search through the list of all devices on every config space access to every device under a PHB. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/phb3.c')
-rw-r--r--hw/phb3.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/hw/phb3.c b/hw/phb3.c
index b33ed7b..c99f1de 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -236,13 +236,8 @@ static void phb3_pcicfg_filter(struct phb *phb, uint32_t bdfn,
return;
}
- /* FIXME: It harms the performance to search the PCI
- * device which doesn't have any filters at all. So
- * it's worthy to maintain a table in PHB to indicate
- * the PCI devices who have filters. However, bitmap
- * seems not supported by skiboot yet. To implement
- * it after bitmap is supported.
- */
+ if (!pci_device_has_cfg_reg_filters(phb, bdfn))
+ return;
pd = pci_find_dev(phb, bdfn);
pcrf = pd ? pci_find_cfg_reg_filter(pd, offset, len) : NULL;
if (!pcrf || !pcrf->func)