diff mbox series

[v4,34/44] x86/boot: drop the use of initial_images unit global

Message ID 20240830214730.1621-35-dpsmith@apertussolutions.com (mailing list archive)
State Superseded
Headers show
Series Boot modules for Hyperlaunch | expand

Commit Message

Daniel P. Smith Aug. 30, 2024, 9:47 p.m. UTC
Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/arch/x86/setup.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 77c0833dd441..977b68098694 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -281,7 +281,6 @@  static const char *cmdline_cook(const char *p, const char *loader_name);
 /* Max number of boot modules a bootloader can provide in addition to Xen */
 #define MAX_NR_BOOTMODS 63
 
-static const struct boot_module *__initdata initial_images;
 static struct boot_info __initdata *boot_info;
 
 static void __init multiboot_to_bootinfo(multiboot_info_t *mbi, module_t *mods)
@@ -337,9 +336,9 @@  unsigned long __init initial_images_nrpages(nodeid_t node)
 
     for ( nr = i = 0; i < boot_info->nr_mods; ++i )
     {
-        unsigned long start = initial_images[i].early_mod->mod_start;
+        unsigned long start = boot_info->mods[i].early_mod->mod_start;
         unsigned long end = start +
-                            PFN_UP(initial_images[i].early_mod->mod_end);
+                            PFN_UP(boot_info->mods[i].early_mod->mod_end);
 
         if ( end > node_start && node_end > start )
             nr += min(node_end, end) - max(node_start, start);
@@ -355,15 +354,14 @@  void __init discard_initial_images(void)
     for ( i = 0; i < boot_info->nr_mods; ++i )
     {
         uint64_t start =
-            (uint64_t)initial_images[i].early_mod->mod_start << PAGE_SHIFT;
+            (uint64_t)boot_info->mods[i].early_mod->mod_start << PAGE_SHIFT;
 
         init_domheap_pages(start,
                            start +
-                           PAGE_ALIGN(initial_images[i].early_mod->mod_end));
+                           PAGE_ALIGN(boot_info->mods[i].early_mod->mod_end));
     }
 
     boot_info->nr_mods = 0;
-    initial_images = NULL;
 }
 
 static void __init init_idle_domain(void)
@@ -1399,8 +1397,6 @@  void asmlinkage __init noreturn __start_xen(unsigned long mbi_p)
     set_kexec_crash_area_size((u64)nr_pages << PAGE_SHIFT);
     kexec_reserve_area();
 
-    initial_images = boot_info->mods;
-
     for ( i = 0; !efi_enabled(EFI_LOADER) && i < boot_info->nr_mods; i++ )
     {
         if ( boot_info->mods[i].early_mod->mod_start & (PAGE_SIZE - 1) )