diff mbox series

[v4,5/8] PPC: switch entry point annotations to common model

Message ID 7f855a0f-602f-910d-8fd9-956b379229f3@suse.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Jan Beulich Aug. 4, 2023, 6:30 a.m. UTC
Use the generic framework in xen/linkage.h. No change in generated code
except of course the converted symbol changes to be a hidden one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v4: Also drop #undef-s from linker script. Re-base.
v3: New.
diff mbox series

Patch

--- a/xen/arch/ppc/include/asm/asm-defns.h
+++ b/xen/arch/ppc/include/asm/asm-defns.h
@@ -2,6 +2,8 @@ 
 #ifndef _ASM_PPC_ASM_DEFNS_H
 #define _ASM_PPC_ASM_DEFNS_H
 
+#include <xen/linkage.h>
+
 /*
  * Load a 64-bit immediate value into the specified GPR.
  */
--- a/xen/arch/ppc/include/asm/config.h
+++ b/xen/arch/ppc/include/asm/config.h
@@ -31,12 +31,7 @@ 
 
 /* Linkage for PPC */
 #ifdef __ASSEMBLY__
-#define ALIGN .p2align 2
-
-#define ENTRY(name)                                                            \
-    .globl name;                                                               \
-    ALIGN;                                                                     \
-    name:
+#define CODE_ALIGN 4
 #endif
 
 #define XEN_VIRT_START _AT(UL, 0xc000000000000000)
--- a/xen/arch/ppc/ppc64/head.S
+++ b/xen/arch/ppc/ppc64/head.S
@@ -5,7 +5,7 @@ 
 
     .section .text.header, "ax", %progbits
 
-ENTRY(start)
+FUNC(start)
     /*
      * NOTE: argument registers (r3-r9) must be preserved until the C entrypoint
      */
@@ -36,6 +36,4 @@  ENTRY(start)
 
     /* should never return */
     trap
-
-    .size start, . - start
-    .type start, %function
+END(start)
--- a/xen/arch/ppc/ppc64/of-call.S
+++ b/xen/arch/ppc/ppc64/of-call.S
@@ -23,7 +23,7 @@ 
 
     .section .init.text, "ax", @progbits
 
-ENTRY(enter_of)
+FUNC(enter_of)
     mflr    %r0
     std     %r0, 16(%r1)
     stdu    %r1, -STACK_SWITCH_FRAME_SIZE(%r1) /* Save SP and create stack space */
@@ -78,6 +78,4 @@  ENTRY(enter_of)
     ld      %r0, 16(%r1)
     mtlr    %r0
     blr
-
-    .size enter_of, . - enter_of
-    .type enter_of, %function
+END(enter_of)
--- a/xen/arch/ppc/xen.lds.S
+++ b/xen/arch/ppc/xen.lds.S
@@ -1,9 +1,6 @@ 
 #include <xen/lib.h>
 #include <xen/xen.lds.h>
 
-#undef ENTRY
-#undef ALIGN
-
 OUTPUT_ARCH(powerpc:common64)
 ENTRY(start)