irq_disable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… irq_disable(9) β€” Kernel API Manual πŸŽ€

okay bestie, welcome to the irq_disable page, straight out of the Kernel API Manual. yes it's a kernel thing. no you're not allowed to be scared of it. let's go ✨


🌸 NAME 🌸

irq_disable β€” Mark interrupt disabled

like, that's the whole vibe. marking an interrupt as disabled. iconic behavior, honestly.


πŸ¦‹ SYNOPSIS πŸ¦‹

void irq_disable (struct irq_desc *desc );

void return, one argument, no drama. she's lowkey minimal and we love that for her.


πŸŽ€ ARGUMENTS πŸŽ€

  • desc β€” the irq descriptor that should be disabled 🫢. that's the thing you're pointing at, that's the thing getting turned off. simple as.

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea, and it's genuinely kind of clever. β˜•

If the chip does not implement the irq_disable callback, we use a lazy disable approach. That means we mark the interrupt disabled, but we leave the hardware unmasked. and no, that's not us being sloppy β€” that's an optimization, because we avoid the hardware access for the common case where no interrupt happens after we marked it disabled. πŸ’… efficient queen.

But if an interrupt does happen? then the interrupt flow handler masks the line at the hardware level and marks it pending. so it all works out, the lazy girlies always pull through. ✨

If the interrupt chip does not implement the irq_disable callback, a driver can disable the lazy approach for a particular irq line by calling 'irq_set_status_flags(irq, IRQ_DISABLE_UNLAZY)'. πŸ¦‹

this one matters: it can be used for devices which cannot disable the interrupt at the device level under certain circumstances and have to use disable_irq[_nosync] instead. so if your device is one of those devices, this is your girl. no cap.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/irq/chip.c β€” and like, literally the whole friend group: irq_set_chip(9), irq_set_irq_type(9), irq_set_handler_data(9), irq_set_msi_desc_off(9), irq_set_msi_desc(9), irq_set_chip_data(9), handle_nested_irq(9), handle_simple_irq(9), handle_untracked_irq(9), handle_level_irq(9), handle_fasteoi_irq(9), handle_fasteoi_nmi(9), handle_edge_irq(9), handle_percpu_irq(9), handle_percpu_devid_irq(9), irq_cpu_online(9), irq_cpu_offline(9), handle_fasteoi_ack_irq(9), handle_fasteoi_mask_irq(9), irq_chip_set_parent_state(9), irq_chip_get_parent_state(9), irq_chip_shutdown_parent(9), irq_chip_startup_parent(9), irq_chip_enable_parent(9), irq_chip_disable_parent(9), irq_chip_ack_parent(9), irq_chip_mask_parent(9), irq_chip_mask_ack_parent(9), irq_chip_unmask_parent(9), irq_chip_eoi_parent(9), irq_chip_set_affinity_parent(9), irq_chip_set_type_parent(9), irq_chip_retrigger_hierarchy(9), irq_chip_set_vcpu_affinity_parent(9), irq_chip_set_wake_parent(9), irq_chip_request_resources_parent(9), irq_chip_release_resources_parent(9), irq_chip_compose_msi_msg(9), irq_chip_pm_get(9), irq_chip_pm_put(9)

like, that's the entire group chat right there. read them all, iykyk. πŸ‘‘


and that's the page!! mwah πŸ’‹ this one came from the ./kernel/irq corner of the tree, dated October 2026 β€” go drink some water, bestie, and go disable an interrupt (lazily, if the chip lets you) πŸŒˆβ­πŸ’–

πŸ“¦ where this page comes from