... by allocating the necessary cpufreq_policy structures. Signed-off-by: Jan Beulich <jbeulich@novell.com> Index: 2008-09-19/xen/arch/x86/acpi/cpufreq/powernow.c ==================================================================--- 2008-09-19.orig/xen/arch/x86/acpi/cpufreq/powernow.c 2008-09-19 13:44:18.000000000 +0200 +++ 2008-09-19/xen/arch/x86/acpi/cpufreq/powernow.c 2008-09-19 15:44:48.000000000 +0200 @@ -283,9 +283,27 @@ int powernow_cpufreq_init(void) /* setup cpufreq infrastructure */ for_each_online_cpu(i) { - cpufreq_cpu_policy[i]->cpu = i; + struct cpufreq_policy *policy = cpufreq_cpu_policy[i]; - ret = powernow_cpufreq_cpu_init(cpufreq_cpu_policy[i]); + if (!policy) { + unsigned int firstcpu; + + firstcpu = first_cpu(processor_pminfo[i]->perf.shared_cpu_map); + if (i == firstcpu) { + policy = xmalloc(struct cpufreq_policy); + if (!policy) { + ret = -ENOMEM; + goto cpufreq_init_out; + } + memset(policy, 0, sizeof(struct cpufreq_policy)); + policy->cpu = i; + } else + policy = cpufreq_cpu_policy[firstcpu]; + cpu_set(i, policy->cpus); + cpufreq_cpu_policy[i] = policy; + } + + ret = powernow_cpufreq_cpu_init(policy); if (ret) goto cpufreq_init_out; } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel