Skip to contentSkip to conversation

arm64: kexec: Check if IRQ is already masked before masking

PATCH Farber, Eliav 1 participant 1 message Nov 27, 2024

lore
Share & tools
lore
#0 lore raw
Quoted 20 lines

Maybe a slightly better approach would be to simplify this code for something that actually uses the kernel infrastructure:

arch/arm64/kernel/machine_kexec.c +2 -5
index 82e2203d86a31..9b48d952df3ec 100644
@@ -230,11 +230,8 @@ static void machine_kexec_mask_interrupts(void)
                    chip->irq_eoi)
                        chip->irq_eoi(&desc->irq_data);
 
-               if (chip->irq_mask)
-                       chip->irq_mask(&desc->irq_data);
-
-               if (chip->irq_disable && !irqd_irq_disabled(&desc->irq_data))
-                       chip->irq_disable(&desc->irq_data);
+               irq_set_status_flags(i, IRQ_DISABLE_UNLAZY);
+               irq_disable(desc);
        }
 }
 
Quoted 1 line

This is of course untested.

I tested your suggested approach and it works.
I will publish V2 for this change.

Thanks, Eliav