mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
commit9d67412f24upstream. iop32x is one of the last platforms to use IRQ 0, and this has apparently stopped working in a 2014 cleanup without anyone noticing. This interrupt is used for the DMA engine, so most likely this has not actually worked in the past 7 years, but it's also not essential for using this board. I'm splitting out this change from my GENERIC_IRQ_MULTI_HANDLER conversion so it can be backported if anyone cares. Fixes:a71b092a9c("ARM: Convert handle_IRQ to use __handle_domain_irq") Signed-off-by: Arnd Bergmann <arnd@arndb.de> [ardb: take +1 offset into account in mask/unmask and init as well] Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Marc Zyngier <maz@kernel.org> Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32 lines
917 B
ArmAsm
32 lines
917 B
ArmAsm
/*
|
|
* arch/arm/mach-iop32x/include/mach/entry-macro.S
|
|
*
|
|
* Low-level IRQ helper macros for IOP32x-based platforms
|
|
*
|
|
* This file is licensed under the terms of the GNU General Public
|
|
* License version 2. This program is licensed "as is" without any
|
|
* warranty of any kind, whether express or implied.
|
|
*/
|
|
.macro get_irqnr_preamble, base, tmp
|
|
mrc p15, 0, \tmp, c15, c1, 0
|
|
orr \tmp, \tmp, #(1 << 6)
|
|
mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access
|
|
mrc p15, 0, \tmp, c15, c1, 0
|
|
mov \tmp, \tmp
|
|
sub pc, pc, #4 @ cp_wait
|
|
.endm
|
|
|
|
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
|
|
mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC
|
|
cmp \irqstat, #0
|
|
clzne \irqnr, \irqstat
|
|
rsbne \irqnr, \irqnr, #32
|
|
.endm
|
|
|
|
.macro arch_ret_to_user, tmp1, tmp2
|
|
mrc p15, 0, \tmp1, c15, c1, 0
|
|
ands \tmp2, \tmp1, #(1 << 6)
|
|
bicne \tmp1, \tmp1, #(1 << 6)
|
|
mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access
|
|
.endm
|