Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/cxl

FieldValue
SubsystemIBM CAPI (Coherent Accelerator) AFU driver for POWER; userspace library https://github.com/ibm-capi/libcxl; implementation file not in cached tree
Config gatenot verifiable from cached tree (no drivers/Kconfig cached)
ABI documentationDocumentation/ABI/removed/sysfs-class-cxl – “The cxl driver was removed in 6.15”; all attributes dated September 2014 - May 2018, “removed February 2025”
SinceSeptember 2014 (first entries); driver removed in 6.15, ABI moved to removed/ February 2025
Live (5.10.134 host)class absent: /sys/class/cxl does not exist in this container
Ledger IDSYSC-cxl

What it represents

The sysfs view of CAPI-attached accelerator AFUs (accelerator function units) on POWER hardware, as used through libcxl. The removed ABI retains the full layout: slave contexts (/sys/class/cxl/afu0.0s), master contexts (afu0.0m), AFU configuration records (cr<config num>), and card directories (card0). Unrelated to the newer CXL.mem subsystem under /sys/bus/cxl (Documentation/ABI/testing/sysfs-bus-cxl, cached separately); the shared three-letter name is the only overlap.

Relationship to the device model

The removed ABI’s preamble records the device-model trick worth remembering: “attributes that are shared between devices are stored in the directory pointed to by the symlink device/. For example, the real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is /sys/class/cxl/afu0.0s/device/irqs_max, i.e. /sys/class/cxl/afu0.0/irqs_max.” So slave-context directories were views whose shared attributes physically lived on the parent AFU device. The ABI also notes AFU configuration records “will show up here (if present)” as PCIe-like config records under cr<N>.

Attributes

AttributeR/WUnit/formatConditional?Source
<afu>/afu_err_bufROAFU error buffer, application-specific contentsslave contextsABI removed sysfs-class-cxl
<afu>/irqs_maxRWdecimal cap on userspace-requestable interrupts (e.g. 2037 default); must be >= irqs_minslave contextsABI removed
<afu>/irqs_minROminimum interrupts for CAPI_START_WORK; omittable via num_interrupts fieldslave contextsABI removed
<afu>/mmio_sizeROdecimal size of MMIO space userspace may mmapslave contextsABI removed
<afu>/modes_supportedROone per line: “dedicated_process”, “afu_directed”slave contextsABI removed
<afu>/modeRWcurrent AFU mode from modes_supported; writable only with no attached user contextsslave contextsABI removed
<afu>/prefault_modeRWnone / work_element_descriptor / all; hashed page table MMU onlyslave contextsABI removed
<afu>/resetWOwrite 1 to reset AFU when no contexts activeslave contextsABI removed
<afu>/api_version, api_version_compatibleROdecimal kernel/user API version and lowest supported versionslave contextsABI removed
<afu>/cr<config num>/{vendor,device,class,config}ROhex IDs of the PCIe-like AFU config record; config is raw binaryif records presentABI removed
<afu>m/mmio_size, pp_mmio_len, pp_mmio_offROmaster-context MMIO size, per-process MMIO length and offsetmaster contextsABI removed
<card>/{caia_version,psl_revision,base_image,image_loaded,psl_timebase_synced,tunneled_ops_supported}ROcard identity and capability strings/flagscard dirsABI removed
<card>/load_image_on_perstRWnone/user/factory: what PERST loadscard dirsABI removed
<card>/perst_reloads_same_imageRW0/1 trust flag for PERST reloadscard dirsABI removed
<card>/resetWOwrite 1 = PERST (no active contexts); write -1 = force PERSTcard dirsABI removed

Safety and writes

Moot in practice: the interface no longer exists in kernels since 6.15 and the whole class is historical. When it lived, writes reset hardware, changed AFU modes, and forced card PERST (-1 bypassing the active-context check). Do not confuse this removed class with /sys/bus/cxl.

References

  • Documentation/ABI/removed/sysfs-class-cxl (cached copy)
  • https://github.com/torvalds/linux/blob/master/Documentation/ABI/removed/sysfs-class-cxl
  • sysfs-attrs.json entry cxl (23 paths); live enumeration: class absent, kernel 5.10.134
  • Related cached file: Documentation/ABI/testing/sysfs-bus-cxl (different subsystem); coverage: ledger