Re: [patch V2a 35/45] genirq/manage: Rework irq_set_irq_wake()

Thomas Gleixner
2025-05-13T22:55:11Z

On Tue, May 13 2025 at 18:32, Jon Hunter wrote:
> On 30/04/2025 13:48, Thomas Gleixner wrote:
>> @@ -846,45 +846,40 @@ static int set_irq_wake_real(unsigned in
>> */
>> int irq_set_irq_wake(unsigned int irq, unsigned int on)
>> {
>> - unsigned long flags;
>> - struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
>> - int ret = 0;
>> + scoped_irqdesc_get_and_lock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
>
>
> I noticed a suspend regression on some of our Tegra boards and bisect
> pointed to this commit. I made the following change and this does appear
> to fix it ...
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 2861e11acf3a..c94837382037 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -846,7 +846,7 @@ static int set_irq_wake_real(unsigned int irq,
> unsigned int on)
> */
> int irq_set_irq_wake(unsigned int irq, unsigned int on)
> {
> - scoped_irqdesc_get_and_lock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
> + scoped_irqdesc_get_and_buslock(irq, IRQ_GET_DESC_CHECK_GLOBAL) {
> struct irq_desc *desc = scoped_irqdesc;
> int ret = 0;
>
> Hence, I wanted to ask if this should still be using the buslock scope here?

Of course. My bad. Care to send a patch with a proper change log?

Thanks

tglx