[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 5/8] Arm: annotate entry points with type and size


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 10 Jul 2023 10:55:21 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bblEvpBVoD14a8jtWBS2FnTxPcXC/Rz9Fz+d/NPUWJs=; b=LTPsxPpR2Wh6a90cPeFLRoDTVuxYoOuT/Wym1HcURMoF7Qcj8eMNogKFbZvRELbAyi2So+5vgRTxEnjQzvttUSaXm/ErPNDcS0y6BU1gERzl8Mp0Rx8rdgrY9TDHTjZLmy378o7XFrmjOZKKJr0BvemgtdHy4bEn8evQjUISFaUA7bvEw6kVF/10k2EUx8f/JsG/0+LIJqqr2qQcqOu3AkKUFVVTf5GpGAkXQWJ7c3Zoc2/MLpHuzo2B3YWil3OW3QDf0Ml2XxobevDgP0uuWcrvG6Ur1TRIdkQnarhO/wCtc+G2G+jqL1nldC0DpLQB4fc/SUj/3VK9waCzDxhNEw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cddsQu99PE3DyMrHn0ulLf8nGqW6C09RoivrLbVe0a3Y1NDs/j62GYLBotRUInhy8I5ZMHEYIJfAqdElpiMOEvMV7sPZojUTshZooJavtkaDMvHulAzj43MmgDgPydfswynY56K96/bqzJ+tqFeDG7SZJE4hhRA/OQ98yWtscue4jEmyM0j70sBRiy5fVXLnyEaIXZCyx8vRKEJKR5vFh7Yd5MSIt8oJSJdsyG9BkGCHzeUpR6FxzaLdPMCYSx3icNuIiWGPCFf3uTPT3rsmjuOJpJuN8IBQEyVw+mFv36CCXMkss59bAHKE3aNhmSfonW2g2SYyJ2zAuQ/gMUR0BQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Delivery-date: Mon, 10 Jul 2023 08:55:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Use the generic framework in xen/linkage.h. No change in generated code
except for the changed padding value (noticable when config.gz isn't a
multiple of 4 in size). Plus of course the converted symbols change to
be hidden ones.

Note that ASM_INT() is switched to DATA(), not DATA_LOCAL(), as the only
use site wants the symbol global anyway.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Only one each of the assembly files is being converted for now. More
could be done right here or as follow-on in separate patches.

The ASM_INT() redundancy of .global will be eliminated by a subsequent
patch.
---
v3: New.

--- a/xen/arch/arm/arm32/lib/div64.S
+++ b/xen/arch/arm/arm32/lib/div64.S
@@ -42,7 +42,7 @@
  * Clobbered regs: xl, ip
  */
 
-ENTRY(__do_div64)
+FUNC(__do_div64)
 UNWIND(.fnstart)
 
        @ Test for easy paths first.
@@ -206,4 +206,4 @@ Ldiv0_64:
        ldr     pc, [sp], #8
 
 UNWIND(.fnend)
-ENDPROC(__do_div64)
+END(__do_div64)
--- a/xen/arch/arm/arm64/lib/clear_page.S
+++ b/xen/arch/arm/arm64/lib/clear_page.S
@@ -22,7 +22,7 @@
  * Parameters:
  *     x0 - dest
  */
-ENTRY(clear_page)
+FUNC(clear_page)
        mrs     x1, dczid_el0
        and     w1, w1, #0xf
        mov     x2, #4
@@ -33,4 +33,4 @@ ENTRY(clear_page)
        tst     x0, #(PAGE_SIZE - 1)
        b.ne    1b
        ret
-ENDPROC(clear_page)
+END(clear_page)
--- a/xen/arch/arm/include/asm/asm_defns.h
+++ b/xen/arch/arm/include/asm/asm_defns.h
@@ -5,6 +5,7 @@
 /* NB. Auto-generated from arch/.../asm-offsets.c */
 #include <asm/asm-offsets.h>
 #endif
+#include <xen/linkage.h>
 #include <asm/processor.h>
 
 /* Macros for generic assembly code */
@@ -28,10 +29,7 @@ label:  .asciz msg;
 .popsection
 
 #define ASM_INT(label, val)                 \
-    .p2align 2;                             \
-label: .long (val);                         \
-    .size label, . - label;                 \
-    .type label, %object
+    DATA(label, 4) .long (val); END(label)
 
 #endif /* __ARM_ASM_DEFNS_H__ */
 /*
--- a/xen/arch/arm/include/asm/config.h
+++ b/xen/arch/arm/include/asm/config.h
@@ -53,7 +53,8 @@
 
 /* Linkage for ARM */
 #ifdef __ASSEMBLY__
-#define ALIGN .align 2
+#define CODE_ALIGN 4
+#define ALIGN .balign CODE_ALIGN
 #define ENTRY(name)                             \
   .globl name;                                  \
   ALIGN;                                        \
@@ -61,8 +62,6 @@
 #define GLOBAL(name)                            \
   .globl name;                                  \
   name:
-#define END(name) \
-  .size name, .-name
 #define ENDPROC(name) \
   .type name, %function; \
   END(name)




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.