All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Orzel <michal.orzel@amd.com>
To: <xen-devel@lists.xenproject.org>
Cc: Michal Orzel <michal.orzel@amd.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: [PATCH 1/3] xen/arm64: head: Move earlyprintk 'hex' string to .rodata.str
Date: Tue, 21 Nov 2023 10:45:14 +0100	[thread overview]
Message-ID: <20231121094516.24714-2-michal.orzel@amd.com> (raw)
In-Reply-To: <20231121094516.24714-1-michal.orzel@amd.com>

At the moment, the 'hex' string is placed right after the 'putn'
function in the .text section. This is because of the limited range
(+/- 1MB) of PC relative 'adr' instruction 'putn' uses. Modify it to use
'adr_l' instead (range extended to +/- 4GB) and move the string to
.rodata.str. This way all the earlyprintk messages will be part of .rodata
and the behavior will be consistent with what we already do on arm32.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/arm64/head.S | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 8dbd3300d89f..b6111399e766 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -498,7 +498,7 @@ ENDPROC(asm_puts)
  * Clobbers x0-x3
  */
 putn:
-        adr   x1, hex
+        adr_l x1, hex
         mov   x3, #16
 1:
         early_uart_ready x23, 2
@@ -512,8 +512,7 @@ putn:
         ret
 ENDPROC(putn)
 
-hex:    .ascii "0123456789abcdef"
-        .align 2
+RODATA_STR(hex, "0123456789abcdef")
 
 #else  /* CONFIG_EARLY_PRINTK */
 
-- 
2.25.1



  reply	other threads:[~2023-11-21  9:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21  9:45 [PATCH 0/3] xen/arm64: head: misc cleanup Michal Orzel
2023-11-21  9:45 ` Michal Orzel [this message]
2023-11-21 15:48   ` [PATCH 1/3] xen/arm64: head: Move earlyprintk 'hex' string to .rodata.str Luca Fancellu
2023-11-21 16:09   ` Julien Grall
2023-11-21 17:00     ` Michal Orzel
2023-11-21 17:04       ` Julien Grall
2023-11-21 17:18         ` Michal Orzel
2023-11-21 18:31           ` Julien Grall
2023-11-22  7:54             ` Michal Orzel
2023-11-21  9:45 ` [PATCH 2/3] xen/arm64: Move print_reg macro to asm/arm64/macros.h Michal Orzel
2023-11-21 16:05   ` Luca Fancellu
2023-11-21 16:16   ` Julien Grall
2023-11-21 17:02     ` Michal Orzel
2023-11-21  9:45 ` [PATCH 3/3] xen/arm64/mmu: head: Replace load_paddr with adr_l where appropriate Michal Orzel
2023-11-21 16:30   ` Julien Grall
2023-11-21 18:13     ` Michal Orzel
2023-11-21 18:43       ` Julien Grall
2023-11-22  8:12         ` Michal Orzel
2023-11-21 16:31   ` Luca Fancellu

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=20231121094516.24714-2-michal.orzel@amd.com \
    --to=michal.orzel@amd.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=julien@xen.org \
    --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.