[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] xen/arm: Skip loops in init_pdx() when no PDX compression is used
commit b9c42be42e7426168cfcd13b1dfaece799af9fb0 Author: Michal Orzel <michal.orzel@xxxxxxx> AuthorDate: Fri Jul 4 09:54:28 2025 +0200 Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx> CommitDate: Mon Jul 7 15:09:01 2025 -0700 xen/arm: Skip loops in init_pdx() when no PDX compression is used When CONFIG_PDX_COMPRESSION=n, pdx_init_mask(), pdx_region_mask() and pfn_pdx_hole_setup() are just stubs doing nothing. It does not make sense to keep the two loops iterating over all the memory banks. Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx> Reviewed-by: Hari Limaye <hari.limaye@xxxxxxx> Tested-by: Hari Limaye <hari.limaye@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/arch/arm/setup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 93b730ffb5..12b76a0a98 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -255,7 +255,9 @@ void __init init_pdx(void) { const struct membanks *mem = bootinfo_get_mem(); paddr_t bank_start, bank_size, bank_end, ram_end = 0; + int bank; +#ifdef CONFIG_PDX_COMPRESSION /* * Arm does not have any restrictions on the bits to compress. Pass 0 to * let the common code further restrict the mask. @@ -264,7 +266,6 @@ void __init init_pdx(void) * update this function too. */ uint64_t mask = pdx_init_mask(0x0); - int bank; for ( bank = 0 ; bank < mem->nr_banks; bank++ ) { @@ -284,6 +285,7 @@ void __init init_pdx(void) } pfn_pdx_hole_setup(mask >> PAGE_SHIFT); +#endif for ( bank = 0 ; bank < mem->nr_banks; bank++ ) { -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |