pdc_irq_handler(9)
π pdc_irq_handler(9) β bestie edition π
okay so this is a page from the Kernel API Manual, and honestly? it's a little one but it's important. sit down, grab a boba, we're talking about the interrupt handler that gets called in interrupt context. yes, the spicy context. π₯
β¨ NAME β¨
pdc_irq_handler β the interrupt handler that gets called in interrupt context. that's it. that's the whole vibe. π«Ά
πΈ SYNOPSIS πΈ
irqreturn_t pdc_irq_handler (int irq , void *data );
look at her. two args, one return type. iconic behavior only. π
π¦ ARGUMENTS π¦
irqβ the interrupt number that has fired. like, the one that actually went off. no cap, that's the whole thing. β¨dataβ the device struct for the DMA engine that generated the interrupt. so basically the "who did this" of the situation π
π DESCRIPTION π
okay so here's what we have to do: we gotta clear the device interrupt status flags right here in this function. no skipping it, bestie, it's literally the assignment. π
so we cache the status for later use in the thread function β yes, cache it, because the thread function is gonna need it and we're being responsible about it. main character energy is being prepared. π
other than that? that's it. that's the whole job. just return WAKE_THREAD to invoke the thread function. slay, done, periodt. π§
β RETURN β
IRQ_WAKE_THREADβ if the interrupt is ours π«Ά (yay, it's ours, it's literally ours)IRQ_NONEβ otherwise π (not ours, not our problem)
π SEE ALSO π
the kernel file lives at ./drivers/mailbox/bcm-pdc-mailbox.c β go look at her, she's the source of truth, iykyk.
and then the whole friend group, no one left out, fr fr:
pdc_setup_debugfs(9)pdc_build_rxd(9)pdc_build_txd(9)pdc_receive_one(9)pdc_receive(9)pdc_tx_list_sg_add(9)pdc_tx_list_final(9)pdc_rx_list_init(9)pdc_rx_list_sg_add(9)pdc_work_cb(9)pdc_ring_init(9)pdc_desc_count(9)pdc_rings_full(9)pdc_last_tx_done(9)pdc_send_data(9)pdc_hw_init(9)pdc_hw_disable(9)pdc_rx_buf_pool_create(9)pdc_interrupts_init(9)pdc_mb_init(9)pdc_dt_read(9)pdc_probe(9)
and that's the whole page, bestie π this little baddie ships out of ./drivers/mailbox and the version on the tin says October 2026 β so like, future vibes. go forth and handle those interrupts 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