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

[Xen-changelog] [linux-2.6.18-xen] kexec: don't initialize when no crash area was reserved



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1323332360 -3600
# Node ID bffd07392da5729ebdbb7caf50524c544eedba7d
# Parent  fdbceb3cec87a0a21416e74139d92aa214dbd023
kexec: don't initialize when no crash area was reserved

While the waste of memory needed may not be significant, the amount of
additional but pointless entries in /proc/iomem certainly may be (on
large systems).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r fdbceb3cec87 -r bffd07392da5 drivers/xen/core/machine_kexec.c
--- a/drivers/xen/core/machine_kexec.c  Thu Dec 08 09:18:42 2011 +0100
+++ b/drivers/xen/core/machine_kexec.c  Thu Dec 08 09:19:20 2011 +0100
@@ -34,6 +34,17 @@
        if (!is_initial_xendomain())
                return;
 
+       /* fill in crashk_res if range is reserved by hypervisor */
+       memset(&range, 0, sizeof(range));
+       range.range = KEXEC_RANGE_MA_CRASH;
+
+       if (HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, &range)
+           || !range.size)
+               return;
+
+       crashk_res.start = range.start;
+       crashk_res.end = range.start + range.size - 1;
+
        /* determine maximum number of physical cpus */
        op.cmd = XENPF_get_cpuinfo;
        op.u.pcpu_info.xen_cpuid = 0;
@@ -96,19 +107,6 @@
        xen_hypervisor_res.end = range.start + range.size - 1;
        xen_hypervisor_res.flags = IORESOURCE_BUSY | IORESOURCE_MEM;
 
-       /* fill in crashk_res if range is reserved by hypervisor */
-
-       memset(&range, 0, sizeof(range));
-       range.range = KEXEC_RANGE_MA_CRASH;
-
-       if (HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, &range))
-               goto free;
-
-       if (range.size) {
-               crashk_res.start = range.start;
-               crashk_res.end = range.start + range.size - 1;
-       }
-
        /* get physical address of vmcoreinfo */
        memset(&range, 0, sizeof(range));
        range.range = KEXEC_RANGE_MA_VMCOREINFO;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.