From: Andrew Cooper Date: Mon, 26 Aug 2013 19:18:33 +0000 (+0100) Subject: xen/arm: Introduce and use GLOBAL() in asm code. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6450 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=604ab14cde7aef3bcdd7bc3bc398e7d1705dc631;p=xen.git xen/arm: Introduce and use GLOBAL() in asm code. Signed-off-by: Andrew Cooper Acked-by: Ian Campbell --- diff --git a/xen/arch/arm/arm32/debug.S b/xen/arch/arm/arm32/debug.S index 92f572499d..ec774cddad 100644 --- a/xen/arch/arm/arm32/debug.S +++ b/xen/arch/arm/arm32/debug.S @@ -23,18 +23,16 @@ #include EARLY_PRINTK_INC #endif -.globl early_putch /* Print a character on the UART - this function is called by C * r0: character to print */ -early_putch: +GLOBAL(early_putch) ldr r1, =FIXMAP_ADDR(FIXMAP_CONSOLE) /* r1 := VA UART base address */ early_uart_ready r1, r2 early_uart_transmit r1, r0 mov pc, lr -.globl early_flush /* Flush the UART - this function is called by C */ -early_flush: +GLOBAL(early_flush) ldr r1, =FIXMAP_ADDR(FIXMAP_CONSOLE) /* r1 := VA UART base address */ early_uart_ready r1, r2 mov pc, lr diff --git a/xen/arch/arm/arm32/entry.S b/xen/arch/arm/arm32/entry.S index 81d5990803..774e7c6766 100644 --- a/xen/arch/arm/arm32/entry.S +++ b/xen/arch/arm/arm32/entry.S @@ -65,9 +65,8 @@ trap_##trap: \ bic sp, #7; /* Align the stack pointer (noop on guest trap) */ \ b do_trap_##trap -.globl hyp_traps_vector .align 5 -hyp_traps_vector: +GLOBAL(hyp_traps_vector) .word 0 /* 0x00 - Reset */ b trap_undefined_instruction /* 0x04 - Undefined Instruction */ b trap_supervisor_call /* 0x08 - Supervisor Call */ diff --git a/xen/arch/arm/arm32/mode_switch.S b/xen/arch/arm/arm32/mode_switch.S index 3500eb06c4..2cd5888097 100644 --- a/xen/arch/arm/arm32/mode_switch.S +++ b/xen/arch/arm/arm32/mode_switch.S @@ -29,8 +29,7 @@ * TODO: Move this code either later (via platform specific desc) or in a bootwrapper * r5: Machine ID * Clobber r0 r2 */ -.globl kick_cpus -kick_cpus: +GLOBAL(kick_cpus) ldr r0, =MACH_TYPE_SMDK5250 teq r5, r0 /* Are we running on the arndale? */ beq kick_cpus_arndale @@ -79,9 +78,7 @@ kick_cpus_sgi: * integration with the bootloader/firmware so that Xen always starts * in Hyp mode. * Clobber r0 - r4 */ - -.globl enter_hyp_mode -enter_hyp_mode: +GLOBAL(enter_hyp_mode) mov r3, lr /* Put return address in non-banked reg */ cpsid aif, #0x16 /* Enter Monitor mode */ mrc CP32(r0, SCR) diff --git a/xen/arch/arm/arm32/proc-v7.S b/xen/arch/arm/arm32/proc-v7.S index 0ab3845a73..e38d5a482f 100644 --- a/xen/arch/arm/arm32/proc-v7.S +++ b/xen/arch/arm/arm32/proc-v7.S @@ -20,8 +20,7 @@ #include #include -.globl v7_init -v7_init: +GLOBAL(v7_init) /* Set up the SMP bit in ACTLR */ mrc CP32(r0, ACTLR) orr r0, r0, #(ACTLR_V7_SMP) /* enable SMP bit */ diff --git a/xen/arch/arm/arm64/debug.S b/xen/arch/arm/arm64/debug.S index c7b5e6ceea..472c157160 100644 --- a/xen/arch/arm/arm64/debug.S +++ b/xen/arch/arm/arm64/debug.S @@ -23,18 +23,16 @@ #include EARLY_PRINTK_INC #endif -.globl early_putch /* Print a character on the UART - this function is called by C * x0: character to print */ -early_putch: +GLOBAL(early_putch) ldr x15, =FIXMAP_ADDR(FIXMAP_CONSOLE) early_uart_ready x15, 1 early_uart_transmit x15, w0 ret -.globl early_flush /* Flush the UART - this function is called by C */ -early_flush: +GLOBAL(early_flush) ldr x15, =FIXMAP_ADDR(FIXMAP_CONSOLE) /* x15 := VA UART base address */ early_uart_ready x15, 1 ret diff --git a/xen/arch/arm/arm64/mode_switch.S b/xen/arch/arm/arm64/mode_switch.S index 4125ac4616..ea64f220d0 100644 --- a/xen/arch/arm/arm64/mode_switch.S +++ b/xen/arch/arm/arm64/mode_switch.S @@ -34,9 +34,7 @@ * integration with the bootloader/firmware so that Xen always starts * at EL2. */ - -.globl enter_el2_mode -enter_el2_mode: +GLOBAL(enter_el2_mode) mov x0, #0x30 // RES1 orr x0, x0, #(1 << 0) // Non-secure EL1 orr x0, x0, #(1 << 8) // HVC enable diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index 259d4c6103..604088e06b 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -63,6 +63,9 @@ .globl name; \ ALIGN; \ name: +#define GLOBAL(name) \ + .globl name; \ + name: #define END(name) \ .size name, .-name #define ENDPROC(name) \