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

[Xen-devel] [PATCH v3 10/10] xen: arm: Only lookup kernel bootmodule once while building dom0 dtb.



Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
v3: New patch
---
 xen/arch/arm/domain_build.c |    4 +++-
 xen/arch/arm/kernel.h       |    1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 154367e..3db2e94 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);
+    struct bootmodule *mod = kinfo->bootmodule;
 
     if ( mod && mod->cmdline[0] )
         bootargs = &mod->cmdline[0];
@@ -1307,6 +1307,8 @@ int construct_dom0(struct domain *d)
     d->max_pages = ~0U;
 
     kinfo.unassigned_mem = dom0_mem;
+    kinfo.bootmodule = boot_module_find_by_kind(BOOTMOD_KERNEL);
+    BUG_ON(!kinfo.bootmodule);
 
     rc = kernel_probe(&kinfo);
     if ( rc < 0 )
diff --git a/xen/arch/arm/kernel.h b/xen/arch/arm/kernel.h
index 7c7f624..2745bb5 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 */
+    struct bootmodule *bootmodule;
     paddr_t dtb_paddr;
     paddr_t initrd_paddr;
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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