|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 2/2] xen/device-tree: move discard_initial_modules() to common code
On 10/8/26 1:19 PM, Orzel, Michal wrote: On 01-Oct-26 13:16, Oleksii Kurochko wrote:Everything discard_initial_modules() touches is already common code: bootinfo.modules, using_static_heap and fw_unreserved_regions(). Move it out of Arm into common/device-tree/bootinfo.c, next to the boot allocator handling of the same memory, and declare it in xen/bootinfo.h, so that other device-tree based architectures can reuse it instead of growing a copy of their own. The arch-specific remove_early_mappings() is not moved along with it: how the early FDT mapping is torn down is up to the architecture. As the DTB is one of the boot modules being released, the mapping has to go once they are discarded, so call it from start_xen() right after discard_initial_modules(), which keeps the common function free of any arch dependency. While moving it, use unsigned int for the loop counter and replace the "goto out" by a plain return, as there is nothing left to do at the label. No functional change. Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> --- xen/arch/arm/include/asm/setup.h | 2 -- xen/arch/arm/setup.c | 35 ++----------------------------- xen/common/device-tree/bootinfo.c | 30 ++++++++++++++++++++++++++ xen/include/xen/bootinfo.h | 8 +++++++ 4 files changed, 40 insertions(+), 35 deletions(-) diff --git a/xen/arch/arm/include/asm/setup.h b/xen/arch/arm/include/asm/setup.h index c491c567298f..02fdf2b56c9c 100644 --- a/xen/arch/arm/include/asm/setup.h +++ b/xen/arch/arm/include/asm/setup.h @@ -40,8 +40,6 @@ int acpi_make_efi_nodes(void *fdt, struct membank tbl_add[]);void create_dom0(void); -void discard_initial_modules(void);- void init_pdx(void); void setup_mm(void);diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c I will drop it in v2 (if it won't merged at the moment when I will start address the comments for this patch series). Other than that: Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx> Thanks! NIT for the future: if you send a series of patches, please move the fixes/code movement changes at the beginning of the series. I will take into account that in the future. ~ Oleksii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |