diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-06-06 08:59:17 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-06 20:49:05 +1000 |
commit | acd94a9c7c589e36db013c026b5910d24af26bab (patch) | |
tree | 86fcd295abaa087d58746ecb00e79226672a5780 /hw | |
parent | 25897895a076471dc4566671fda5cf7d2a2c3379 (diff) | |
download | skiboot-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')
-rw-r--r-- | hw/phb3.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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) |