ntbm_msi_re...threaded_irq(9)
πΈ NAME πΈ
Okay bestie, welcome to the Kernel API Manual page for ntbm_msi_request_threaded_irq β the page header abbreviates it as ntbm_msi_re...threaded_irq(9), because apparently even manpages gotta keep it short and mysterious. β¨ This function is here to allocate an MSI interrupt. No cap. π
β¨ SYNOPSIS β¨
int ntbm_msi_request_threaded_irq (struct ntb_dev *ntb , irq_handler_t
handler , irq_handler_t thread_fn , const char *name , void *dev_id ,
struct ntb_msi_desc *msi_desc );
π ARGUMENTS π
ntbβ the NTB device context. It's the device situation you're working with, bestie.handlerβ function to be called when the IRQ occurs. This is the main-character callback. πthread_fnβ function to be called in a threaded interrupt context. It'sNULLfor clients which handle everything inhandler. So ifhandleris doing the whole thing, this cutie staysNULL. π«Άnameβ an ascii name for the claiming device,dev_name(dev)ifNULL. Name drop it, or letdev_name(dev)handle it.dev_idβ a cookie passed back to the handler function. πͺ Not the snack kind, but it is being passed back, so.msi_descβ MSI descriptor data which triggers the interrupt. This is the descriptor that makes the interrupt happen.
π DESCRIPTION π
Here's the vibe: this function assigns an interrupt handler to an unused MSI interrupt and returns the descriptor used to trigger it. Then that descriptor can be sent to a peer to trigger the interrupt. Iconic behavior, honestly. π₯
The interrupt resource is managed with devres, so it will be automatically freed when the NTB device is torn down. Lowkey one less cleanup thing for you. β¨
If an IRQ allocated with this function needs to be freed separately, ntbm_free_irq must be used. Like, for real β that's the required call for freeing it separately. Don't skip it. π
π₯ RETURN π₯
IRQ number assigned on success, otherwise a negative error number. So: success gives you the IRQ number, and anything else is a negative error number. Read the return value, bestie. π
π SEE ALSO π
- Kernel file
./drivers/ntb/msi.cβ go read the source, iykyk. ntb_msi_init(9)ntb_msi_setup_mws(9)ntb_msi_clear_mws(9)ntb_msi_peer_trigger(9)
Mwah π this page comes from ./drivers/ntb and is dated October 2026 β that's the source/version and date footer, folded in with love. π«Άπ
π¦ 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