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

Re: [PATCH v4 05/13] xen/arm: Move MMU related definitions from config.h to mmu/layout.h



Hi Henry,

On 01/08/2023 04:44, Henry Wang wrote:
From: Wei Chen <wei.chen@xxxxxxx>

Xen defines some global configuration macros for Arm in config.h.
However there are some address layout related definitions that are
defined for MMU systems only, and these definitions could not be
used by MPU systems. Adding ifdefs with CONFIG_HAS_MPU to gate these

You haven't yet introduced HAS_MPU. So I would suggest to write: 'Adding ifdefs to differentiate the MPU from MMU layout will result in a ...'.

definitions will result in a messy and hard-to-read/maintain code.

So move MMU related definitions to a new file, i.e. mmu/layout.h to
avoid spreading "#ifdef" everywhere.

AFAICT, you are moving all memory layout definition in a separate file. So I would say it explicitely rather than using "MMU related definitions".


Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
Signed-off-by: Henry Wang <Henry.Wang@xxxxxxx>

With the comments addressed:

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®.