]> Gentwo Git Trees - linux/.git/commit
irqchip/sifive-plic: Cache the interrupt enable state
authorCharles Mirabile <cmirabil@redhat.com>
Fri, 24 Oct 2025 08:36:42 +0000 (09:36 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 24 Oct 2025 19:34:32 +0000 (21:34 +0200)
commit14ff9e54dd14339776afff78e2d29e0edb3a4402
treefedcf58984bcd30f74fb74ba0bab147793859a59
parent9dfb295a93eb109be989aac48f675db5b1c68bd8
irqchip/sifive-plic: Cache the interrupt enable state

Optimize the PLIC driver by maintaining the interrupt enable state in the
handler's enable_save array during normal operation rather than only during
suspend/resume. This eliminates the need to read enable registers during
suspend and makes the enable state immediately available for other
purposes.

Let __plic_toggle() update both the hardware registers and the cached
enable_save state atomically within the existing enable_lock protection.

That allows to remove the suspend-time enable register reading since
handler::enable_save now always reflects the current state.

[ tglx: Massaged change log ]

Signed-off-by: Charles Mirabile <cmirabil@redhat.com>
Signed-off-by: Lucas Zampieri <lzampier@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://patch.msgid.link/20251024083647.475239-4-lzampier@redhat.com
drivers/irqchip/irq-sifive-plic.c