---
name: "hwloc_get_hostbridge_by_pcibus"
section: "3"
platform: "linux"
package: "libhwloc-doc"
version: "1.11.12-3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/hwlocality_advanced_io"
---

# hwloc\_get\_hostbridge\_by\_pcibus(3)

Part of [hwlocality\_advanced\_io(3)](/hwlocality_advanced_io/3.md).

## NAME

hwlocality\_advanced\_io

## SYNOPSIS

### Functions

static **hwloc\_obj\_t** **hwloc\_get\_non\_io\_ancestor\_obj** (**hwloc\_topology\_t** topology, **hwloc\_obj\_t** ioobj)\
 static **hwloc\_obj\_t** **hwloc\_get\_next\_pcidev** (**hwloc\_topology\_t** topology, **hwloc\_obj\_t** prev)\
 static **hwloc\_obj\_t** **hwloc\_get\_pcidev\_by\_busid** (**hwloc\_topology\_t** topology, unsigned domain, unsigned bus, unsigned dev, unsigned func)\
 static **hwloc\_obj\_t** **hwloc\_get\_pcidev\_by\_busidstring** (**hwloc\_topology\_t** topology, const char \*busid)\
 static **hwloc\_obj\_t** **hwloc\_get\_next\_osdev** (**hwloc\_topology\_t** topology, **hwloc\_obj\_t** prev)\
 static **hwloc\_obj\_t** **hwloc\_get\_next\_bridge** (**hwloc\_topology\_t** topology, **hwloc\_obj\_t** prev)\
 static int **hwloc\_bridge\_covers\_pcibus** (**hwloc\_obj\_t** bridge, unsigned domain, unsigned bus)\
 static **hwloc\_obj\_t** **hwloc\_get\_hostbridge\_by\_pcibus** (**hwloc\_topology\_t** topology, unsigned domain, unsigned bus)\

## Detailed Description

## Function Documentation

### static int hwloc\_bridge\_covers\_pcibus (hwloc\_obj\_t bridge, unsigned domain, unsigned bus)` [inline]`, ` [static]`

### static hwloc\_obj\_t hwloc\_get\_hostbridge\_by\_pcibus (hwloc\_topology\_t topology, unsigned domain, unsigned bus)` [inline]`, ` [static]`

Find the hostbridge that covers the given PCI bus. This is useful for finding the locality of a bus because it is the hostbridge parent cpuset.

### static hwloc\_obj\_t hwloc\_get\_next\_bridge (hwloc\_topology\_t topology, hwloc\_obj\_t prev)` [inline]`, ` [static]`

Get the next bridge in the system.

**Returns:**

the first bridge if `prev` is `NULL`.

### static hwloc\_obj\_t hwloc\_get\_next\_osdev (hwloc\_topology\_t topology, hwloc\_obj\_t prev)` [inline]`, ` [static]`

Get the next OS device in the system.

**Returns:**

the first OS device if `prev` is `NULL`.

### static hwloc\_obj\_t hwloc\_get\_next\_pcidev (hwloc\_topology\_t topology, hwloc\_obj\_t prev)` [inline]`, ` [static]`

Get the next PCI device in the system.

**Returns:**

the first PCI device if `prev` is `NULL`.

### static hwloc\_obj\_t hwloc\_get\_non\_io\_ancestor\_obj (hwloc\_topology\_t topology, hwloc\_obj\_t ioobj)` [inline]`, ` [static]`

Get the first non-I/O ancestor object. Given the I/O object `ioobj`, find the smallest non-I/O ancestor object. This regular object may then be used for binding because its locality is the same as `ioobj`.

### static hwloc\_obj\_t hwloc\_get\_pcidev\_by\_busid (hwloc\_topology\_t topology, unsigned domain, unsigned bus, unsigned dev, unsigned func)` [inline]`, ` [static]`

Find the PCI device object matching the PCI bus id given domain, bus device and function PCI bus id.

### static hwloc\_obj\_t hwloc\_get\_pcidev\_by\_busidstring (hwloc\_topology\_t topology, const char \* busid)` [inline]`, ` [static]`

Find the PCI device object matching the PCI bus id given as a string xxxx:yy:zz.t or yy:zz.t.

## Author

Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.
