xen/arm: Introduce and use GLOBAL() in asm code.
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 26 Aug 2013 19:18:33 +0000 (20:18 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 27 Aug 2013 13:26:31 +0000 (14:26 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/arm32/debug.S
xen/arch/arm/arm32/entry.S
xen/arch/arm/arm32/mode_switch.S
xen/arch/arm/arm32/proc-v7.S
xen/arch/arm/arm64/debug.S
xen/arch/arm/arm64/mode_switch.S
xen/include/asm-arm/config.h

index 92f572499d444038bea03f32c50fb3a5847726d6..ec774cddadbe67e9e859d957a51bbdbf382b9680 100644 (file)
 #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
index 81d5990803871e0dd2ac749bf4874bd70e87e2da..774e7c6766e2d1838f0b06948f8dc8e9b1617c7e 100644 (file)
@@ -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 */
index 3500eb06c4c9103460b37ff0a2dc5359f9b74b43..2cd58880979fe370169440ebf45a625e902b14b5 100644 (file)
@@ -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)
index 0ab3845a73de09e898789d5e241b3c0fc4f1e78e..e38d5a482f833c0326339ec697d02424878e571c 100644 (file)
@@ -20,8 +20,7 @@
 #include <asm/asm_defns.h>
 #include <asm/arm32/processor.h>
 
-.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 */
index c7b5e6ceeaa5864b913d8bbb781b04a9c4c53151..472c15716004d17786f4d7771147c015b01ab8c8 100644 (file)
 #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
index 4125ac4616bada63730c17a4c7ad67c6c148157d..ea64f220d01b052d9e28dbdb83a417b9dbaf275d 100644 (file)
@@ -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
index 259d4c6103e8e6a95b84dbf859d281d1937e52ce..604088e06bd41fd9a91b798ce64e4b46393498f6 100644 (file)
@@ -63,6 +63,9 @@
   .globl name;                                  \
   ALIGN;                                        \
   name:
+#define GLOBAL(name)                            \
+  .globl name;                                  \
+  name:
 #define END(name) \
   .size name, .-name
 #define ENDPROC(name) \