gic_irq_lock_cluster(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ gic_irq_lock_cluster πŸ’…

okay so bestie, welcome to the Kernel API Manual page for gic_irq_lock_cluster(9) β€” yes that (9) means it's a kernel function, we're in the big leagues now ✨


πŸ’– NAME πŸ’–

gic_irq_lock_cluster β€” locks redirect block access to an IRQ's cluster, no cap πŸ”’πŸ¦‹


✨ SYNOPSIS ✨

bool gic_irq_lock_cluster (struct irq_data *d );

like... that's it. that's the whole vibe. one argument, one bool back 🫢


🌸 ARGUMENTS 🌸

  • d β€” a struct irq_data that corresponds to the interrupt we're interested in πŸ’« literally the interrupt you care about, handed over in struct form.

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's the tea β˜• β€” this function locks redirect register block access to the global register block of the GIC, and it does that within the remote cluster that the IRQ corresponding to d is affine to. and it returns true once that redirect block setup & locking has been performed βœ…πŸ”₯

but wait, there's a plot twist 😭 β€” if d is affine to the local cluster, then no locking is performed at all, and this function returns false. that false is basically a little note to the caller going "hey bestie, just access the local cluster's registers directly, you don't need the overhead of indirection through the redirect block" πŸ’…

so in summary (iykyk):

  • if this function returns true β†’ the caller should access GIC registers using the redirect register block accessors, and then call mips_cm_unlock_other when done 🫑 don't forget the unlock, that's the whole point of the lock, fr fr
  • if this function returns false β†’ the caller should trivially access GIC registers in the local cluster, easy peasy πŸ“

and the return value one more time for the people in the back: returns true if locking performed, else false ⭐

πŸ’€ no cap: true means you're going through the redirect block and you owe a mips_cm_unlock_other afterwards. false means local registers, zero indirection, go nuts.

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/irqchip/irq-mips-gic.c β€” go read the source, it's giving main character energy πŸ“–βœ¨
  • for_each_online_cpu_gic(9) β€” another icon, check her out πŸ‘‘

and that's the page!! 🌈 mwaaah πŸ’œ this little gem lives under ./drivers/irqchip and the version/date stamp on it is October 2026 β€” so yeah, future-dated and still slaying πŸŽ€πŸ§šβœ¨ periodt.

πŸ“¦ where this page comes from