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

[Xen-devel] [PATCH 1/5] xen: Always calculate max_cpus value



max_cpus is not available since 20374 changeset (Miscellaneous data
placement adjustments). It was moved to __initdata section. This section
is freed after Xen initialization. Assume that max_cpus is always
equal to XEN_HYPER_SIZE(cpumask_t) * 8.

Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>

diff -Npru crash-6.0.8.orig/xen_hyper.c crash-6.0.8/xen_hyper.c
--- crash-6.0.8.orig/xen_hyper.c        2012-06-29 16:59:18.000000000 +0200
+++ crash-6.0.8/xen_hyper.c     2012-07-05 14:52:59.000000000 +0200
@@ -1879,11 +1879,9 @@ xen_hyper_get_cpu_info(void)
        uint *cpu_idx;
        int i, j, cpus;
 
-       get_symbol_data("max_cpus", sizeof(xht->max_cpus), &xht->max_cpus);
        XEN_HYPER_STRUCT_SIZE_INIT(cpumask_t, "cpumask_t");
-       if (XEN_HYPER_SIZE(cpumask_t) * 8 > xht->max_cpus) {
-               xht->max_cpus = XEN_HYPER_SIZE(cpumask_t) * 8;
-       }
+       xht->max_cpus = XEN_HYPER_SIZE(cpumask_t) * 8;
+
        if (xht->cpumask) {
                free(xht->cpumask);
        }

_______________________________________________
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®.