• Aaro Koskinen's avatar
    irqchip/i8259: Fix shutdown order by moving syscore_ops registration · 518bfe84
    Aaro Koskinen authored
    When using cpufreq on Loongson 2F MIPS platform, "poweroff"
    command gets frequently stuck in syscore_shutdown(). The reason is
    that i8259A_shutdown() gets called before cpufreq_suspend(), and if we
    have pending work then irq_work_sync() in cpufreq_dbs_governor_stop()
    gets stuck forever as we have all interrupts masked already.
    
    irq-i8259 is registering syscore_ops using device_initcall(),
    while cpufreq uses core_initcall(). Fix the shutdown order simply
    by registering the irq syscore_ops during the early IRQ init instead
    of using a separate initcall at later stage.
    Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    518bfe84
irq-i8259.c 9.87 KB