On 22/02/2022 15:55, Bertrand Marquis wrote:
Hi Julien,

Hi Bertrand,

On 21 Feb 2022, at 10:22, Julien Grall <jul...@xen.org> wrote:

From: Julien Grall <jgr...@amazon.com>

The array level_orders and level_masks can be replaced with the
recently introduced macros LEVEL_ORDER and LEVEL_MASK.

Signed-off-by: Julien Grall <jgr...@amazon.com>

Reviewed-by: Bertrand Marquis <bertrand.marq...@arm.com>

One open question: At this stage the convenience aliases that you
kept in include/asm/lpae.h are used in a very limited number of places.

I am not sure I would call it very limited:

42sh> ack "(FIRST|SECOND|THIRD)_(ORDER|SHIFT|MASK)" | wc -l
65

That's including the 9 definitions.

Could we remove those and use only XEN_PT_LEVEL_* to make the
code a bit more coherent.

I made an attempt in the past and it resulted to longer line in assembly. So I am on the fence to whether the aliases should be completely removed.

At the same time, XEN_PT_LEVEL(...) is handy for places where we don't know at compile time the level.

Cheers,

--
Julien Grall

Reply via email to