Hi,
On 11/06/2015 04:28, Wei Wang wrote:
cpufreq_cpu_policy is used in intel_pstate_set_pstate(), so we change
to NULL it after the call of cpufreq_driver->exit. Otherwise, a
calltrace will show up on your screen due to the reference of a NULL
pointer when you power down the system.
Signed-off-by: Wei Wang <wei.w.w...@intel.com>
---
xen/drivers/cpufreq/cpufreq.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c
index 6003a8c..a8772e8 100644
--- a/xen/drivers/cpufreq/cpufreq.c
+++ b/xen/drivers/cpufreq/cpufreq.c
@@ -335,12 +335,11 @@ int cpufreq_del_cpu(unsigned int cpu)
/* for HW_ALL, stop gov for each core of the _PSD domain */
/* for SW_ALL & SW_ANY, stop gov for the 1st core of the _PSD domain */
- if (hw_all || (cpumask_weight(cpufreq_dom->map) ==
- perf->domain_info.num_processors))
+ if (!policy->policy && (hw_all || (cpumask_weight(cpufreq_dom->map) ==
+ perf->domain_info.num_processors)))
Based on your patch #6, the field policy contains value which is defined
per-cpufreq driver (because you defined internal value). How can you be
sure that a driver will never use 0 as a valid value?
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel