---
name: "pci_bus_alloc_resource"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/pci_bus_alloc_resource"
---

# pci\_bus\_alloc\_resource(9)

allocate a resource from a parent bus

## NAME

pci\_bus\_alloc\_resource - allocate a resource from a parent bus

## SYNOPSIS

**int pci\_bus\_alloc\_resource(struct pci\_bus \*** *bus***, struct resource \*** *res***, resource\_size\_t** *size***, resource\_size\_t** *align***, resource\_size\_t** *min***, unsigned long** *type\_mask***, resource\_size\_t (\****alignf***) (void \*, const struct resource \*, resource\_size\_t, resource\_size\_t), void \*** *alignf\_data***);**

## ARGUMENTS

*bus*

PCI bus

*res*

resource to allocate

*size*

size of resource to allocate

*align*

alignment of resource to allocate

*min*

minimum /proc/iomem address to allocate

*type\_mask*

IORESOURCE\_\* type flags

*alignf*

resource alignment function

*alignf\_data*

data argument for resource alignment function

## DESCRIPTION

Given the PCI bus a device resides on, the size, minimum address, alignment and type, try to find an acceptable resource allocation for a specific device resource.

## COPYRIGHT
