[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen: arm: Only lookup kernel/initrd bootmodule once while building dom0.



commit 0040b649d6df262e7aa3f903bbe1279f1aebac5c
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Mon Jul 21 13:09:16 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Jul 24 16:23:18 2014 +0100

    xen: arm: Only lookup kernel/initrd bootmodule once while building dom0.
    
    Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Acked-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c |    6 +++---
 xen/arch/arm/kernel.c       |    2 ++
 xen/arch/arm/kernel.h       |    1 +
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 154367e..23261e4 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -405,7 +405,7 @@ static int write_properties(struct domain *d, struct 
kernel_info *kinfo,
     int res = 0;
     int had_dom0_bootargs = 0;
 
-    struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_KERNEL);
+    const struct bootmodule *mod = kinfo->kernel_bootmodule;
 
     if ( mod && mod->cmdline[0] )
         bootargs = &mod->cmdline[0];
@@ -455,7 +455,7 @@ static int write_properties(struct domain *d, struct 
kernel_info *kinfo,
 
     if ( dt_node_path_is_equal(node, "/chosen") )
     {
-        struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_RAMDISK);
+        const struct bootmodule *mod = kinfo->initrd_bootmodule;
 
         if ( bootargs )
         {
@@ -1224,7 +1224,7 @@ static void dtb_load(struct kernel_info *kinfo)
 
 static void initrd_load(struct kernel_info *kinfo)
 {
-    struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_RAMDISK);
+    const struct bootmodule *mod = kinfo->initrd_bootmodule;
     paddr_t load_addr = kinfo->initrd_paddr;
     paddr_t paddr, len;
     unsigned long offs;
diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/kernel.c
index 230ff8f..eaeadb5 100644
--- a/xen/arch/arm/kernel.c
+++ b/xen/arch/arm/kernel.c
@@ -116,6 +116,7 @@ static void place_modules(struct kernel_info *info,
 
     info->dtb_paddr = modbase;
     info->initrd_paddr = info->dtb_paddr + dtb_len;
+    info->initrd_bootmodule = mod;
 }
 
 static paddr_t kernel_zimage_place(struct kernel_info *info)
@@ -383,6 +384,7 @@ int kernel_probe(struct kernel_info *info)
         return -ENOENT;
     }
 
+    info->kernel_bootmodule = mod;
     start = mod->start;
     size = mod->size;
 
diff --git a/xen/arch/arm/kernel.h b/xen/arch/arm/kernel.h
index 7c7f624..0050dfb 100644
--- a/xen/arch/arm/kernel.h
+++ b/xen/arch/arm/kernel.h
@@ -23,6 +23,7 @@ struct kernel_info {
     paddr_t entry;
 
     /* boot blob load addresses */
+    const struct bootmodule *kernel_bootmodule, *initrd_bootmodule;
     paddr_t dtb_paddr;
     paddr_t initrd_paddr;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.