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

RE: [PATCH 5/7] xen/arm32: head: Move earlyprintk messages to .rodata.str


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiamei Xie <Jiamei.Xie@xxxxxxx>
  • Date: Mon, 15 Aug 2022 01:57:03 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=IqRxi4owzZheNTdVrBxVUgSOIEGw6tiPtdiPxEA+Xs0=; b=NOzya0HQ89sr0MrLE5/vehJaRtZ+SvEJvXMXZdC2jeqOw5/d1NhadH623Zbg2LYcOpF1UIWQAV3t+88IQWSlwBqMSLiy17ro9NN+yWzzONolKUy3uLuITQVUASuY0HNSBpmYnncQJ3hVnOf6PZwaPiY3CCAWeMho3ByP+ZQMiNpsf9pE5h80PyelCBk6utts2nZkG6U1TuJBxVzAgTFuekFG7x0ARAg2PPEn0TYWhNjuFOhH5Lsk3bWaWURKUWvTqFtCBk3DT3JYnn+2MdFcUGfu+jQKtz75CqdiW7J8DPKrmbzP9p9ORdx/BLUctBL9JqEVimZzMV+9ZY/GoMUZDg==
  • 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=IqRxi4owzZheNTdVrBxVUgSOIEGw6tiPtdiPxEA+Xs0=; b=GK+le4ZWe/4dH1kN3J6S++iGvgL+MsABc0lRHHAGmQnu16egsaxFLajgVHBtQtW1NcDcvMfEU9FR1rbOs/a+h6CC9xNzkmzNKQbrAWOfHLLMQrlzAlr4iImIumI2T1JCa+4Cnro7BZ/0ds5sAS/50uBI7BPjnqYvaoXJ5IKKl8IuTOWcOblvqTbbzxdJiva+hvCxRd4b/8ToXn7ykSNx7A9Aj1CjUORNl/UwKjHGTlAZ7qaU+iAEMWuYbkJH/dzZ5VRs6K1u2Ui4HEQFZZnvSBNft/a+mW5nprF8iEKzY+hW++LTjEk1OvkNfyaZw/NtQ+f3TtMpdhqGcaxUgHVydA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=SM48gVFyQyhfr923aNghiQqXQIKuTN9WmADPUfzC0ob3J43ZbLRahLOV2+koJYuasxqs5r0Maueliu2hqXGcDiGNRiDSUJ97u+qExFolZKipm/upzjm+jOencghXf0TC8i2xjm82WzGfelHoGKS2viyFBiEgbuFKLJMhQHwdYegE2yEf1xTcfZiQ1F6dt8mIgwPyWmlQ74uoNSZD28pRpuUv+Hg2Q6UIrMz0XRNCXiLJBK4xFAFe9LUkjdPElOhvpIOekd0PdENkBADEcpq7DvFLo6nUDoYtkmzqg81pn+xKuNsYHeYWvfYdE8lpeWdHonytXHE3VsbNuWV1rmgQxw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kvZGr6lRg+CpylFDGqKhcOVIAEWF73znaC1PVtjKBhWxSwkXoFA8sY5HRNBJiH4ldlyuZDIE2mN9vxYrARRv61U6kCwUi8ZyeRaTkBS572+XZYBnFMEYHVeREP4FJiaBcMfyakYfGjlZznJG6PXyff3cDr2V3CvHmY9giELJjPW5KmKk2cBh6EixcBFUOfVW9dLeRjhzcKbwqz3X0z3DMzpGpfFTREIN6Vr+r/Bx4Qk+UVRMBzr8wwsu/PQhg4vQLAuEyphWs+Hjnv14s1OtiemBJg4jCJhOExhnv3CQGu5DqROwyIsGO+EQIjtN6ZaBSxyuZQypQNOziAwib+M2Dg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 15 Aug 2022 01:57:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYroFLBRc7msyHakaqPASkuC1hfq2vNtWg
  • Thread-topic: [PATCH 5/7] xen/arm32: head: Move earlyprintk messages to .rodata.str

Hi Julien,

> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Julien Grall
> Sent: Saturday, August 13, 2022 3:25 AM
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: julien@xxxxxxx; Julien Grall <jgrall@xxxxxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; Bertrand Marquis <Bertrand.Marquis@xxxxxxx>;
> Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
> Subject: [PATCH 5/7] xen/arm32: head: Move earlyprintk messages
> to .rodata.str
> 
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  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
> 

That looks good to me.
Reviewed-by: Jiamei Xie <jiamei.xie@xxxxxxx>

Best wishes
Jiamei Xie





 


Rackspace

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