• Arnd Bergmann's avatar
    ARM: iop32x: use GENERIC_IRQ_MULTI_HANDLER · 6f5d248d
    Arnd Bergmann authored
    iop32x uses the entry-macro.S file for both the IRQ entry and for
    hooking into the arch_ret_to_user code path. This is done because the
    cp6 registers have to be enabled before accessing any of the interrupt
    controller registers but have to be disabled when running in user space.
    
    There is also a lazy-enable logic in cp6.c, but during a hardirq, we
    know it has to be enabled.
    
    Both the cp6-enable code and the code to read the IRQ status can be
    lifted into the normal generic_handle_arch_irq() path, but the
    cp6-disable code has to remain in the user return code. As nothing
    other than iop32x uses this hook, just open-code it there with an
    ifdef for the platform that can eventually be removed when iop32x
    has reached the end of its life.
    
    The cp6-enable path in the IRQ entry has an extra cp_wait barrier that
    the trap version does not have, but it is harmless to do it in both
    cases to simplify the logic here at the cost of a few extra cycles
    for the trap.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    Tested-by: default avatarMarc Zyngier <maz@kernel.org>
    Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
    6f5d248d
cp6.c 935 Bytes