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

Re: [PATCH v5 04/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S





On 21/08/2023 10:29, Henry Wang wrote:
On Aug 21, 2023, at 17:18, Julien Grall <julien@xxxxxxx> wrote:
On 14/08/2023 05:25, Henry Wang wrote:
The MMU specific code in head.S will not be used on MPU systems.
Instead of introducing more #ifdefs which will bring complexity
to the code, move MMU related code to mmu/head.S and keep common
code in head.S. Two notes while moving:
- As "fail" in original head.S is very simple and this name is too
   easy to be conflicted, duplicate it in mmu/head.S instead of
   exporting it.
- Use ENTRY() for enable_secondary_cpu_mm, enable_boot_cpu_mm and
   setup_fixmap to please the compiler after the code movement.

I am not sure I understand why you are saying "to please the compiler" here. 
Isn't it necessary for the linker (not the compiler) to find the function? And therefore 
there is no pleasing (as in this is not a bug in the toolchain).

Yes it meant to be linker, sorry for the confusion. What I want to express is
without the ENTRY(), for example if we remove the ENTRY() around the
setup_fixmap(), we will have:

```
aarch64-none-linux-gnu-ld: prelink.o: in function `primary_switched':
/home/xinwan02/repos_for_development/xen_playground/xen/xen/arch/arm/arm64/head.S:278:
 undefined reference to `setup_fixmap'
/home/xinwan02/repos_for_development/xen_playground/xen/xen/arch/arm/arm64/head.S:278:(.text.header+0x1a0):
 relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol 
`setup_fixmap'
make[2]: *** [arch/arm/Makefile:95: xen-syms] Error 1
make[1]: *** [build.mk:90: xen] Error 2
make: *** [Makefile:598: xen] Error 2
```

I will use the word “linker” in v6 if you agree.

The sentence also need to be reworded. How about:

"Use ENTRY() for ... as they will be used externally."



Other than that, the split looks good to me.

May I please take this as a Reviewed-by tag? I will add the tag if you are
happy with that.

Sure. Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>

Cheers,

--
Julien Grall



 


Rackspace

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