Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: GIC: private a standard get_irqnr_preamble assembler macro

Provide a standard get_irqnr_preamble assembler macro for platforms
to use, which retrieves the base address of the GIC CPU interface
from gic_cpu_base_addr. Allow platforms to override this by defining
HAVE_GET_IRQNR_PREAMBLE.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

+10 -16
+7
arch/arm/include/asm/hardware/entry-macro-gic.S
··· 10 10 11 11 #include <asm/hardware/gic.h> 12 12 13 + #ifndef HAVE_GET_IRQNR_PREAMBLE 14 + .macro get_irqnr_preamble, base, tmp 15 + ldr \base, =gic_cpu_base_addr 16 + ldr \base, [\base] 17 + .endm 18 + #endif 19 + 13 20 /* 14 21 * The interrupt numbering scheme is defined in the 15 22 * interrupt controller spec. To wit:
-5
arch/arm/mach-cns3xxx/include/mach/entry-macro.S
··· 14 14 .macro disable_fiq 15 15 .endm 16 16 17 - .macro get_irqnr_preamble, base, tmp 18 - ldr \base, =gic_cpu_base_addr 19 - ldr \base, [\base] 20 - .endm 21 - 22 17 .macro arch_ret_to_user, tmp1, tmp2 23 18 .endm
+1
arch/arm/mach-omap2/include/mach/entry-macro.S
··· 170 170 171 171 172 172 #ifdef CONFIG_ARCH_OMAP4 173 + #define HAVE_GET_IRQNR_PREAMBLE 173 174 #include <asm/hardware/entry-macro-gic.S> 174 175 175 176 .macro get_irqnr_preamble, base, tmp
-5
arch/arm/mach-realview/include/mach/entry-macro.S
··· 13 13 .macro disable_fiq 14 14 .endm 15 15 16 - .macro get_irqnr_preamble, base, tmp 17 - ldr \base, =gic_cpu_base_addr 18 - ldr \base, [\base] 19 - .endm 20 - 21 16 .macro arch_ret_to_user, tmp1, tmp2 22 17 .endm 23 18
+1 -1
arch/arm/mach-tegra/include/mach/entry-macro.S
··· 16 16 #include <mach/io.h> 17 17 18 18 #if defined(CONFIG_ARM_GIC) 19 - 19 + #define HAVE_GET_IRQNR_PREAMBLE 20 20 #include <asm/hardware/entry-macro-gic.S> 21 21 22 22 /* Uses the GIC interrupt controller built into the cpu */
+1
arch/arm/mach-ux500/include/mach/entry-macro.S
··· 11 11 * warranty of any kind, whether express or implied. 12 12 */ 13 13 #include <mach/hardware.h> 14 + #define HAVE_GET_IRQNR_PREAMBLE 14 15 #include <asm/hardware/entry-macro-gic.S> 15 16 16 17 .macro disable_fiq
-5
arch/arm/mach-vexpress/include/mach/entry-macro.S
··· 3 3 .macro disable_fiq 4 4 .endm 5 5 6 - .macro get_irqnr_preamble, base, tmp 7 - ldr \base, =gic_cpu_base_addr 8 - ldr \base, [\base] 9 - .endm 10 - 11 6 .macro arch_ret_to_user, tmp1, tmp2 12 7 .endm