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

Re: [PATCH for-next v2 1/2] xen/arm: Include asm/asm-offsets.h and asm/macros.h on every assembly files





On 17/03/2021 14:38, Bertrand Marquis wrote:
Hi Julien,

Hi Bertrand,

On 13 Mar 2021, at 16:06, Julien Grall <julien@xxxxxxx> wrote:

From: Julien Grall <jgrall@xxxxxxxxxx>

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@xxxxxxxxxx>

Everything is now building :-)

I could not find a better then your define as filtering out or undefining 
__ASSEMBLY__
is actually not working.

Yes, unfortunately the linker is also relying on __ASSEMBLY__ for a few macros and to also remove the definitions of structure/function from headers that can be included either in C or assembly.

-D__LINKER__ was the best option I could come up with.


So with the fix from offset to defns:

Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Thanks! I will resend a new version with the fix fold in this patch.

Cheers,

--
Julien Grall



 


Rackspace

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