zpci_add_device(9)
π zpci_add_device(9) β the kernel API manual, but make it make sense β¨
okay bestie, so this one is a page straight out of the Kernel API Manual, and it's literally about giving a zPCI device its whole moment. like, the device exists already, and this function is what makes it β¨officialβ¨ in the zPCI subsystem. let's get into it π«Ά
π NAME π
zpci_add_device β take a zPCI device you already created and actually, y'know, add it to the zPCI subsystem. no cap, that's the whole vibe check. π
β¨ SYNOPSIS β¨
int zpci_add_device (struct zpci_dev *zdev );
that's the whole signature, keep it exactly like that, she's iconic π
π¦ ARGUMENTS π¦
zdevβ the zPCI device you want to add. that's the one, that's the main character π
πΈ DESCRIPTION πΈ
okay so picture this: a struct zpci_dev gets added to the zPCI subsystem, and also to a virtual PCI bus β and a brand-new bus gets created as necessary if there isn't one already. a hotplug slot gets created, and events start being handled. it's giving "new kid walks in, whole room shifts" ππ₯
important bestie: if this succeeds, then from this point on you must usezpci_zdev_getandzpci_zdev_put. those two. not whatever you were doing before. periodt.
and if adding the struct zpci_dev fails, then the device was not added, and it should be freed. don't leave it lying around, that's littering π
β RETURN β
0 on success, or an error code otherwise. that's it, that's the deal π
π SEE ALSO π
- the kernel file
./arch/s390/pci/pci.c zpci_hot_reset_device(9)zpci_create_device(9)zpci_scan_configured_device(9)zpci_deconfigure_device(9)zpci_device_reserved(9)zpci_clear_error_state(9)zpci_reset_load_store_blocked(9)
all the siblings in the family, go read them, iykyk π
and that's the page, bestie π from ./arch/s390/pci, dated October 2026, and the page herself is zpci_add_device(9) β go add some devices and slay responsibly, mwah π§β¨
π¦ 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