diff mbox series

xen/arm: unbreak arm64 build

Message ID alpine.DEB.2.21.1908061615000.2451@sstabellini-ThinkPad-T480s (mailing list archive)
State New, archived
Headers show
Series xen/arm: unbreak arm64 build | expand

Commit Message

Stefano Stabellini Aug. 6, 2019, 11:17 p.m. UTC
Commit 4941bfbf11eae05c92aa3242e353d173974ce7bf "xen/arm64: macros:
Introduce an assembly macro to alias x30" moved

  lr      .req    x30

to macros.h, and started to use "lr" in head.S. However, it didn't add
an #include macros.h to head.S. This commit fixes it.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>

Comments

Julien Grall Aug. 7, 2019, 10:14 a.m. UTC | #1
Hi Stefano,

Please use add_maintainers.pl to CC the correct reviewers.

It is quite common to specify the compiler/binutils version used when this is 
not an obvious compiler error (i.e missing braces or semi-column).

In this case, this passed OSStest smoke and I haven't noticed any issues with 
GCC 8.3. Furthermore, the documentation [1] suggests that lr is automatically 
aliased to x30.

So there is something different with your setup. Looking at the binutils code, 
the alias was added in 2017 [2], so this was firstly introduced in binutils 2.29.

On 07/08/2019 00:17, Stefano Stabellini wrote:
> Commit 4941bfbf11eae05c92aa3242e353d173974ce7bf "xen/arm64: macros:

NIT: please put a short version of the sha1 here instead of the long version. 
The title will make it uniq.

> Introduce an assembly macro to alias x30" moved
> 
>    lr      .req    x30
> 
> to macros.h, and started to use "lr" in head.S. However, it didn't add
> an #include macros.h to head.S. This commit fixes it.

At the risk of being pedantic, the commit you mention does not make any use of 
"lr" in head.S. This was introduced by a later patch.

In nutshell, I am happy with the change but the commit message/title needs more 
explanation.

> 
> Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
> 
> diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
> index 28efe9230c..50cff08756 100644
> --- a/xen/arch/arm/arm64/head.S
> +++ b/xen/arch/arm/arm64/head.S
> @@ -25,6 +25,7 @@
>   #include <asm/early_printk.h>
>   #include <efi/efierr.h>
>   #include <asm/arm64/efibind.h>
> +#include <asm/arm64/macros.h>
>   
>   #define PT_PT     0xf7f /* nG=1 AF=1 SH=11 AP=01 NS=1 ATTR=111 T=1 P=1 */
>   #define PT_MEM    0xf7d /* nG=1 AF=1 SH=11 AP=01 NS=1 ATTR=111 T=0 P=1 */
> 

Cheers,

[1] https://sourceware.org/binutils/docs/as/AArch64-Directives.html
[2] 62e20ed45e "Add support for AArch64 system register names IP0, IP1, FP and LR."
diff mbox series

Patch

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 28efe9230c..50cff08756 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -25,6 +25,7 @@ 
 #include <asm/early_printk.h>
 #include <efi/efierr.h>
 #include <asm/arm64/efibind.h>
+#include <asm/arm64/macros.h>
 
 #define PT_PT     0xf7f /* nG=1 AF=1 SH=11 AP=01 NS=1 ATTR=111 T=1 P=1 */
 #define PT_MEM    0xf7d /* nG=1 AF=1 SH=11 AP=01 NS=1 ATTR=111 T=0 P=1 */