All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: xen-devel@lists.xenproject.org
Cc: julien@xen.org, Julien Grall <jgrall@amazon.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: [PATCH 5/7] xen/arm32: head: Move earlyprintk messages to .rodata.str
Date: Fri, 12 Aug 2022 20:24:44 +0100	[thread overview]
Message-ID: <20220812192448.43016-6-julien@xen.org> (raw)
In-Reply-To: <20220812192448.43016-1-julien@xen.org>

From: Julien Grall <jgrall@amazon.com>

At the moment, the strings are in text right after each use because
the instruction 'adr' has specific requirement on the location
and the compiler will forbid cross section label.

The macro 'adr_l' was recently reworked so the caller doesn't need
to know whether the MMU is on. This makes it easier to use where
instructions can be run in both context.

This also means that the strings don't need to be part of .text
anymore. So move them to .rodata.str.

Signed-off-by: Julien Grall <jgrall@amazon.com>
---
 xen/arch/arm/arm32/head.S | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index 27d02ac8d68f..a558c2a6876e 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -93,13 +93,10 @@
  */
 #define PRINT(_s)           \
         mov   r3, lr       ;\
-        adr   r0, 98f      ;\
+        adr_l r0, 98f      ;\
         bl    puts         ;\
         mov   lr, r3       ;\
-        b     99f          ;\
-98:     .asciz _s          ;\
-        .align 2           ;\
-99:
+        RODATA_STR(98, _s)
 
 /*
  * Macro to print the value of register \rb
@@ -736,7 +733,7 @@ ENDPROC(puts)
  * Clobbers r0-r3
  */
 putn:
-        adr   r1, hex
+        adr_l r1, hex
         mov   r3, #8
 1:
         early_uart_ready r11, r2
@@ -749,8 +746,7 @@ putn:
         mov   pc, lr
 ENDPROC(putn)
 
-hex:    .ascii "0123456789abcdef"
-        .align 2
+RODATA_STR(hex, "0123456789abcdef")
 
 #else  /* CONFIG_EARLY_PRINTK */
 
-- 
2.37.1



  parent reply	other threads:[~2022-08-12 19:25 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 19:24 [PATCH 0/7] xen/arm: More clean-ups and improvement Julien Grall
2022-08-12 19:24 ` [PATCH 1/7] xen/arm64: head: Don't set x22 and update the documentation Julien Grall
2022-08-15  1:36   ` Wei Chen
2022-08-15 13:43   ` Bertrand Marquis
2022-08-12 19:24 ` [PATCH 2/7] xen/arm64: head: Introduce get_table_slot() and use it Julien Grall
2022-08-15  1:45   ` Wei Chen
2022-08-15 14:45   ` Bertrand Marquis
2022-08-15 16:44     ` Julien Grall
2022-08-16  7:36       ` Bertrand Marquis
2022-08-12 19:24 ` [PATCH 3/7] xen/arm32: " Julien Grall
2022-08-15  1:48   ` Wei Chen
2022-08-15 14:56   ` Bertrand Marquis
2022-08-12 19:24 ` [PATCH 4/7] xen/arm32: heap: Rework adr_l so it doesn't rely on where Xen is loaded Julien Grall
2022-08-15  1:56   ` Wei Chen
2022-08-15 15:28   ` Bertrand Marquis
2022-08-12 19:24 ` Julien Grall [this message]
2022-08-15  1:57   ` [PATCH 5/7] xen/arm32: head: Move earlyprintk messages to .rodata.str Jiamei Xie
2022-08-15  2:05   ` Wei Chen
2022-08-15  6:43   ` Jan Beulich
2022-08-15  8:17     ` Julien Grall
2022-08-15  8:21       ` Jan Beulich
2022-08-15 16:46         ` Julien Grall
2022-08-15 16:26   ` Bertrand Marquis
2022-08-12 19:24 ` [PATCH 6/7] xen/arm: Tweak the dump page-table walk output Julien Grall
2022-08-15  1:32   ` Henry Wang
2022-08-15 16:12   ` Bertrand Marquis
2022-08-12 19:24 ` [PATCH 7/8] patch arm32-tweak-enable-mmu.patch Julien Grall
2022-08-12 19:24 ` [PATCH 7/7] xen/arm32: traps: Dump more information for hypervisor data abort Julien Grall
2022-08-15  1:40   ` Henry Wang
2022-08-15 16:47     ` Julien Grall
2022-08-16  3:29       ` Henry Wang
2022-08-31 19:12         ` Julien Grall
2022-08-15 16:39   ` Bertrand Marquis
2022-08-15 17:04     ` Julien Grall
2022-08-16  7:28       ` Bertrand Marquis
2022-08-31 19:17         ` Julien Grall
2022-08-12 19:24 ` [PATCH 8/8] " Julien Grall
2022-08-15 16:48   ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220812192448.43016-6-julien@xen.org \
    --to=julien@xen.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=jgrall@amazon.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.