irqchip/irq-brcmstb-l2: Avoid saving mask on shutdown
authorFlorian Fainelli <florian.fainelli@broadcom.com>
Wed, 24 Apr 2024 17:57:32 +0000 (10:57 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 24 Apr 2024 19:11:48 +0000 (21:11 +0200)
commitc7cad38d37486668a448215fc92bace9c8cf747a
tree524cab53b404adb57d02e78b50cbca9c297f43f9
parent6678ae1918ff554f7438ff3f1a3be22d6d01f2fb
irqchip/irq-brcmstb-l2: Avoid saving mask on shutdown

The interrupt controller shutdown path does not need to save the mask of
enabled interrupts because the next state the system is going to be in is
akin to a cold boot, or a kexec'd kernel. Saving the mask only makes sense
if the software state needs to preserve the hardware state across a system
suspend/resume cycle.

As an optimization, and given that there are systems with dozens of such
interrupt controller, save a "slow" memory mapped I/O read in the shutdown
path where no saving/restoring is required.

Reported-by: Tim Ross <tim.ross@broadcom.com>
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240424175732.1526531-1-florian.fainelli@broadcom.com
drivers/irqchip/irq-brcmstb-l2.c