[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87le55ulw5.ffs@tglx>
Date: Mon, 22 Apr 2024 23:29:14 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Florian Fainelli <florian.fainelli@...adcom.com>,
linux-kernel@...r.kernel.org
Cc: opendmb@...il.com, Florian Fainelli <florian.fainelli@...adcom.com>, Tim
Ross <tim.ross@...adcom.com>, Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>, "open list:BROADCOM BMIPS MIPS
ARCHITECTURE" <linux-mips@...r.kernel.org>, "moderated list:BROADCOM
BCM7XXX ARM
ARCHITECTURE" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] irqchip/irq-brcmstb-l2: Avoid saving mask on shutdown
On Tue, Apr 16 2024 at 12:43, Florian Fainelli wrote:
> 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.
Sure, but
> Reported-by: Tim Ross <tim.ross@...adcom.com>
> Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>
> ---
> drivers/irqchip/irq-brcmstb-l2.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb-l2.c
> index 2b0b3175cea0..c988886917f7 100644
> --- a/drivers/irqchip/irq-brcmstb-l2.c
> +++ b/drivers/irqchip/irq-brcmstb-l2.c
> @@ -118,7 +118,7 @@ static void brcmstb_l2_intc_irq_handle(struct irq_desc *desc)
> chained_irq_exit(chip, desc);
> }
>
> -static void brcmstb_l2_intc_suspend(struct irq_data *d)
> +static void __brcmstb_l2_intc_suspend(struct irq_data *d, bool save)
> {
> struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
> struct irq_chip_type *ct = irq_data_get_chip_type(d);
> @@ -127,7 +127,8 @@ static void brcmstb_l2_intc_suspend(struct irq_data *d)
>
> irq_gc_lock_irqsave(gc, flags);
> /* Save the current mask */
> - b->saved_mask = irq_reg_readl(gc, ct->regs.mask);
> + if (save)
> + b->saved_mask = irq_reg_readl(gc, ct->regs.mask);
what's the conditional actually buying you except more complex code?
Thanks,
tglx
Powered by blists - more mailing lists