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 /include | |
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 'include')
-rw-r--r-- | include/pci.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/pci.h b/include/pci.h index dc418a9..1e84b51 100644 --- a/include/pci.h +++ b/include/pci.h @@ -20,6 +20,7 @@ #include <opal.h> #include <device.h> #include <lock.h> +#include <bitmap.h> #include <ccan/list/list.h> struct pci_device; @@ -87,6 +88,7 @@ struct pci_device { struct dt_node *dn; struct pci_slot *slot; struct pci_device *parent; + struct phb *phb; struct list_head children; struct list_node link; }; @@ -343,6 +345,7 @@ struct phb { const struct phb_ops *ops; struct pci_lsi_state lstate; uint32_t mps; + bitmap_t *filter_map; /* PCI-X only slot info, for PCI-E this is in the RC bridge */ struct pci_slot *slot; @@ -424,6 +427,7 @@ extern struct pci_device *pci_walk_dev(struct phb *phb, void *userdata); extern struct pci_device *pci_find_dev(struct phb *phb, uint16_t bdfn); extern void pci_restore_bridge_buses(struct phb *phb, struct pci_device *pd); +extern bool pci_device_has_cfg_reg_filters(struct phb *phb, uint16_t bdfn); extern struct pci_cfg_reg_filter *pci_find_cfg_reg_filter(struct pci_device *pd, uint32_t start, uint32_t len); extern struct pci_cfg_reg_filter *pci_add_cfg_reg_filter(struct pci_device *pd, |