Lines Matching refs:piar
59 struct pci_io_addr_range *piar; in __eeh_addr_cache_get_device() local
60 piar = rb_entry(n, struct pci_io_addr_range, rb_node); in __eeh_addr_cache_get_device()
62 if (addr < piar->addr_lo) in __eeh_addr_cache_get_device()
64 else if (addr > piar->addr_hi) in __eeh_addr_cache_get_device()
67 return piar->edev; in __eeh_addr_cache_get_device()
105 struct pci_io_addr_range *piar; in eeh_addr_cache_print() local
106 piar = rb_entry(n, struct pci_io_addr_range, rb_node); in eeh_addr_cache_print()
108 (piar->flags & IORESOURCE_IO) ? "i/o" : "mem", cnt, in eeh_addr_cache_print()
109 &piar->addr_lo, &piar->addr_hi, pci_name(piar->pcidev)); in eeh_addr_cache_print()
123 struct pci_io_addr_range *piar; in eeh_addr_cache_insert() local
128 piar = rb_entry(parent, struct pci_io_addr_range, rb_node); in eeh_addr_cache_insert()
129 if (ahi < piar->addr_lo) { in eeh_addr_cache_insert()
131 } else if (alo > piar->addr_hi) { in eeh_addr_cache_insert()
134 if (dev != piar->pcidev || in eeh_addr_cache_insert()
135 alo != piar->addr_lo || ahi != piar->addr_hi) { in eeh_addr_cache_insert()
138 return piar; in eeh_addr_cache_insert()
141 piar = kzalloc(sizeof(struct pci_io_addr_range), GFP_ATOMIC); in eeh_addr_cache_insert()
142 if (!piar) in eeh_addr_cache_insert()
145 piar->addr_lo = alo; in eeh_addr_cache_insert()
146 piar->addr_hi = ahi; in eeh_addr_cache_insert()
147 piar->edev = pci_dev_to_eeh_dev(dev); in eeh_addr_cache_insert()
148 piar->pcidev = dev; in eeh_addr_cache_insert()
149 piar->flags = flags; in eeh_addr_cache_insert()
151 eeh_edev_dbg(piar->edev, "PIAR: insert range=[%pap:%pap]\n", in eeh_addr_cache_insert()
154 rb_link_node(&piar->rb_node, parent, p); in eeh_addr_cache_insert()
155 rb_insert_color(&piar->rb_node, &pci_io_addr_cache_root.rb_root); in eeh_addr_cache_insert()
157 return piar; in eeh_addr_cache_insert()
220 struct pci_io_addr_range *piar; in __eeh_addr_cache_rmv_dev() local
221 piar = rb_entry(n, struct pci_io_addr_range, rb_node); in __eeh_addr_cache_rmv_dev()
223 if (piar->pcidev == dev) { in __eeh_addr_cache_rmv_dev()
224 eeh_edev_dbg(piar->edev, "PIAR: remove range=[%pap:%pap]\n", in __eeh_addr_cache_rmv_dev()
225 &piar->addr_lo, &piar->addr_hi); in __eeh_addr_cache_rmv_dev()
227 kfree(piar); in __eeh_addr_cache_rmv_dev()
265 struct pci_io_addr_range *piar; in eeh_addr_cache_show() local
271 piar = rb_entry(n, struct pci_io_addr_range, rb_node); in eeh_addr_cache_show()
274 (piar->flags & IORESOURCE_IO) ? "i/o" : "mem", in eeh_addr_cache_show()
275 &piar->addr_lo, &piar->addr_hi, pci_name(piar->pcidev)); in eeh_addr_cache_show()