ibm_read_apci_table(9)
π ibm_read_apci_table(9) π
okay bestie, welcome to the Kernel API Manual β this page is all about ibm_read_apci_table, the callback for the sysfs apci_table file. iconic little sysfs reader behavior, honestly. π
β¨ NAME β¨
ibm_read_apci_table β callback for the sysfs apci_table file.
π SYNOPSIS π
ssize_t ibm_read_apci_table (struct file *filp , struct kobject *kobj ,
const struct bin_attribute *bin_attr , char *buffer , loff_t pos ,
size_t size );
πΈ ARGUMENTS πΈ
filpβ the open sysfs file, obvi.kobjβ the kobject this binary attribute is a part of.bin_attrβ thestruct bin_attributefor this file.bufferβ the kernel space buffer to fill. fill it, bestie.posβ the offset into the file.sizeβ the number of bytes requested.
π¦ DESCRIPTION π¦
okay so this gets registered with sysfs as the reader callback to be executed when /sys/bus/pci/slots/apci_table gets read. main character callback energy, truly.
Since we don't get notified on open and close for this file, things get really tricky here... our solution is to only allow reading the table in all at once. that's the whole move. π
π SEE ALSO π
The kernel file is ./drivers/pci/hotplug/acpiphp_ibm.c, and the whole crew is:
ibm_slot_from_id(9)ibm_set_attention_status(9)ibm_get_attention_status(9)ibm_handle_events(9)ibm_get_table_from_acpi(9)ibm_find_acpi_device(9)
mwah π β source/version: ./drivers/pci/hotplug, date: October 2026. periodt, 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