pci_resource_is_io(9)
π pci_resource_is_io(9) π
okay so bestie, welcome to the pci_resource_is_io(9) page from the Kernel API Manual β yes it's a kernel function, no it's not scary, i promise π«Ά it's literally one of the chillest little helpers in the PCI part of the tree and we're gonna get you comfy with it in like thirty seconds, fr fr.
β¨ NAME β¨
pci_resource_is_io β check if a PCI resource is of I/O port type. that's it. that's the whole job. she's a one-trick pony and she's iconic for it π
πΈ SYNOPSIS πΈ
bool pci_resource_is_io (const struct pci_dev *dev , int resno );
look at her. look at that signature. so clean, so simple, so giving "i know exactly what i am" β¨
π ARGUMENTS π
devβ the PCI device to check. like, hand her the device and she'll go look at its resources for you, no cap π¦resnoβ the resource number (BAR index) to check. that's the BAR index bestie, so she knows which resource you're asking about π
π DESCRIPTION π
Returns true if the resource type is I/O port.
that's it. that's the description. she looks at the resource, she sees it's I/O port type, she hits you with a true. not an I/O port? no true for you π the function name literally tells you what it does β lowkey the most honest function in the kernel, i'm obsessed π
side note bestie: this one is a straight-up yes/no vibe check on the resource type β don't go reading extra meaning into it, she's not doing anything else for you π
π SEE ALSO π
the whole friend group, and yes they all get to show up in the list, every single one, because we don't do half-finished SEE ALSO sections in this house π
enum pci_interrupt_pin(9)pci_channel_state_t(9)pci_is_bridge(9)pci_is_vga(9)pci_is_display(9)struct pci_driver(9)PCI_DEVICE(9)PCI_DEVICE_DRIVER_OVERRIDE(9)PCI_DRIVER_OVERRIDE_DEVICE_VFIO(9)PCI_DEVICE_SUB(9)PCI_DEVICE_CLASS(9)PCI_VDEVICE(9)PCI_VDEVICE_SUB(9)PCI_DEVICE_DATA(9)pcie_capability_clear_and_set_word(9)pci_bus_for_each_resource(9)module_pci_driver(9)builtin_pci_driver(9)pci_irq_type(9)pci_irqd_intx_xlate(9)pci_resource_is_mem(9)β her sibling!! the memory-type counterpart, go say hi π§pci_pcie_cap(9)pci_is_pcie(9)pcie_caps_reg(9)pci_pcie_type(9)pcie_find_root_port(9)pci_vpd_alloc(9)pci_vpd_find_id_string(9)pci_vpd_find_ro_info_keyword(9)pci_vpd_check_csum(9)pci_ari_enabled(9)pci_is_thunderbolt_attached(9)
and where does she live? kernel file ./include/linux/pci.h obviously β that's the address, that's the home base π
okay that's the whole page, you slayed it, go check some BARs π
β¨ this lil sign-off comes to you from ./include/linux, dated October 2026, and yes the manual name is pci_resource_is_io(9) β mwah, bye bestie ππ¦π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms