[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v5 33/44] x86/boot: convert initial_images to struct boot_module
On 2024-10-06 17:49, Daniel P. Smith wrote: The variable initial_images is used for tracking the boot modules passed in by the boot loader. Convert to a struct boot_module and adjust the code that uses it accordingly. Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> --- xen/arch/x86/setup.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index d5916e85f68e..30a139074833 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -336,8 +336,9 @@ unsigned long __init initial_images_nrpages(nodeid_t node)for ( nr = i = 0; i < bi->nr_modules; ++i ){ - unsigned long start = initial_images[i].mod_start; - unsigned long end = start + PFN_UP(initial_images[i].mod_end); + unsigned long start = initial_images[i].mod->mod_start; + unsigned long end = start + + PFN_UP(initial_images[i].mod->mod_end); This can fit on a single line. if ( end > node_start && node_end > start )nr += min(node_end, end) - max(node_start, start); @@ -353,10 +354,12 @@ void __init discard_initial_images(void)for ( i = 0; i < bi->nr_modules; ++i ){ - uint64_t start = (uint64_t)initial_images[i].mod_start << PAGE_SHIFT; + uint64_t start = + (uint64_t)initial_images[i].mod->mod_start << PAGE_SHIFT;init_domheap_pages(start,- start + PAGE_ALIGN(initial_images[i].mod_end)); + start + + PAGE_ALIGN(initial_images[i].mod->mod_end)); This can fit on a single line. }bi->nr_modules = 0; With those fixed: Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |