xen/arm: Include asm/asm-offsets.h and asm/macros.h on every assembly files
authorJulien Grall <jgrall@amazon.com>
Sat, 23 Jan 2021 17:48:45 +0000 (17:48 +0000)
committerJulien Grall <jgrall@amazon.com>
Sun, 18 Apr 2021 17:59:54 +0000 (18:59 +0100)
commit8d1ca2ac8d5763e72350b4f1ff34ae3276d99e4a
treee1c2b06e8aacff847b99634785094557f6bbfcfd
parentdd22a64de7e02b48312839a15179528c8f7db5c6
xen/arm: Include asm/asm-offsets.h and asm/macros.h on every assembly files

In a follow-up patch we may want to automatically replace some
mnemonics (such as ret) with a different sequence.

To ensure all the assembly files will include asm/macros.h it is best to
automatically include it on single assembly. This can be done via
config.h.

It was necessary to include a few more headers as dependency:
  - <asm/asm_defns.h> to define sizeof_*
  - <xen/page-size.h> which is already a latent issue given STACK_ORDER
  rely on PAGE_SIZE.

Unfortunately the build system will use -D__ASSEMBLY__ when generating
the linker script. A new option -D__LINKER__ is introduceed and used for
the linker script to avoid including headers (such as asm/macros.h) that
may not be compatible with the syntax.

Lastly, take the opportunity to remove both asm/asm-offsets.h and
asm/macros.h from the various assembly files as they are now
automagically included.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/Makefile
xen/arch/arm/arm32/entry.S
xen/arch/arm/arm32/head.S
xen/arch/arm/arm32/proc-v7.S
xen/arch/arm/arm64/debug-cadence.inc
xen/arch/arm/arm64/debug-pl011.inc
xen/arch/arm/arm64/entry.S
xen/arch/arm/arm64/head.S
xen/arch/arm/arm64/smc.S
xen/include/asm-arm/config.h