ocxl_context_alloc(9)
β¨ ocxl_context_alloc(9) β¨
okay so bestie, welcome to the Kernel API Manual page for ocxl_context_alloc(9) β yes that's the whole header, yes we're doing this π
πΈ NAME πΈ
ocxl_context_alloc β allocate an OpenCAPI context, that's literally the whole vibe π¦
β¨ SYNOPSIS β¨
int ocxl_context_alloc (struct ocxl_context **context , struct ocxl_afu
*afu , struct address_space *mapping );
like, it returns an int, periodt π₯
π ARGUMENTS π
contextβ the OpenCAPI context you're allocating π ngl this one's important: it must be freed withocxl_context_freeor the vibe check fails π don't leave it hanging, bestie.afuβ the AFU this context belongs to π« like, whose context is it anyway, iykyk.mappingβ the mapping that gets unmapped when the context is closed π§ and guess what, it may beNULLβ no cap, that's allowed π
π«Ά SEE ALSO π«Ά
the whole friend group shows up here, so like, go say hi π
Kernel file ./include/misc/ocxl.h, plus: ocxl_function_open(9), ocxl_function_afu_list(9), ocxl_function_fetch_afu(9), ocxl_afu_get(9), ocxl_afu_put(9), ocxl_function_config(9), ocxl_function_close(9), ocxl_context_free(9), ocxl_context_attach(9), ocxl_context_detach(9), ocxl_afu_irq_alloc(9), ocxl_afu_irq_free(9), ocxl_afu_irq_get_addr(9), ocxl_irq_set_handler(9), ocxl_afu_config(9), ocxl_afu_set_private(9), ocxl_afu_get_private(9), ocxl_global_mmio_read32(9), ocxl_global_mmio_read64(9), ocxl_global_mmio_write32(9), ocxl_global_mmio_write64(9), ocxl_global_mmio_set32(9), ocxl_global_mmio_set64(9), ocxl_global_mmio_clear32(9), ocxl_global_mmio_clear64(9) π
bestie if you remember nothing else: alloc it, then ocxl_context_free it. that's the main character energy this page deserves β
k that's a wrap π« this lil page lives in ./include/misc, October 2026 edition β mwah, go touch some firmware ππ
π¦ 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