From: Mykola Kvach <mykola_kvach@epam.com>
On ARM, during system resume, CPUs are brought online again. This normally
triggers init_local_irq_data, which reinitializes IRQ descriptors for
banked interrupts (SGIs and PPIs).
These descriptors are statically allocated per CPU and retain valid
state across suspend/resume cycles. Re-initializing them on resume is
unnecessary and may result in loss of interrupt configuration or
restored state.
This patch skips init_local_irq_data when system_state is set to
SYS_STATE_resume to preserve banked IRQ descs state during resume.
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
---
xen/arch/arm/irq.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
index 361496a6d0..6c899347ca 100644
--- a/xen/arch/arm/irq.c
+++ b/xen/arch/arm/irq.c
@@ -125,6 +125,10 @@ static int cpu_callback(struct notifier_block *nfb, unsigned long action,
switch ( action )
{
case CPU_UP_PREPARE:
+ /* Skip local IRQ cleanup on resume */
+ if ( system_state == SYS_STATE_resume )
+ break;
+
rc = init_local_irq_data(cpu);
if ( rc )
printk(XENLOG_ERR "Unable to allocate local IRQ for CPU%u\n",
--
2.48.1