@@ -68,7 +68,7 @@ int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
return -ENODEV;
if ( hwp_active() )
return -EOPNOTSUPP;
- if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
+ if ( !pmpt || !(pmpt->init & XEN_PX_INIT) )
return -EINVAL;
break;
default:
@@ -463,7 +463,7 @@ int do_pm_op(struct xen_sysctl_pm_op *op)
case CPUFREQ_PARA:
if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
return -ENODEV;
- if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
+ if ( !pmpt || !(pmpt->init & XEN_PX_INIT) )
return -EINVAL;
break;
}
@@ -209,7 +209,7 @@ int cpufreq_add_cpu(unsigned int cpu)
perf = &processor_pminfo[cpu]->perf;
- if ( !(perf->init & XEN_PX_INIT) )
+ if ( !(processor_pminfo[cpu]->init & XEN_PX_INIT) )
return -EINVAL;
if (!cpufreq_driver.init)
@@ -367,7 +367,7 @@ int cpufreq_del_cpu(unsigned int cpu)
perf = &processor_pminfo[cpu]->perf;
- if ( !(perf->init & XEN_PX_INIT) )
+ if ( !(processor_pminfo[cpu]->init & XEN_PX_INIT) )
return -EINVAL;
if (!per_cpu(cpufreq_cpu_policy, cpu))
@@ -563,7 +563,7 @@ int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *perf)
if ( cpufreq_verbose )
print_PPC(pxpt->platform_limit);
- if ( pxpt->init == XEN_PX_INIT )
+ if ( pmpt->init == XEN_PX_INIT )
{
ret = cpufreq_limit_change(cpu);
goto out;
@@ -572,7 +572,7 @@ int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *perf)
if ( perf->flags == ( XEN_PX_PCT | XEN_PX_PSS | XEN_PX_PSD | XEN_PX_PPC ) )
{
- pxpt->init = XEN_PX_INIT;
+ pmpt->init = XEN_PX_INIT;
ret = cpufreq_cpu_init(cpu);
goto out;
@@ -29,14 +29,14 @@ struct processor_performance {
struct xen_processor_px *states;
struct xen_psd_package domain_info;
uint32_t shared_type;
-
- uint32_t init;
};
struct processor_pminfo {
uint32_t acpi_id;
uint32_t id;
struct processor_performance perf;
+
+ uint32_t init;
};
extern struct processor_pminfo *processor_pminfo[NR_CPUS];
AMD cpufreq cores will be intialized in two modes, legacy P-state mode, and CPPC mode. So "init" flag shall be extracted from specific "struct xen_processor_perf", and placed in the common "struct processor_pminfo". Signed-off-by: Penny Zheng <Penny.Zheng@amd.com> --- v3 -> v4: - new commit --- xen/drivers/acpi/pmstat.c | 4 ++-- xen/drivers/cpufreq/cpufreq.c | 8 ++++---- xen/include/acpi/cpufreq/processor_perf.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-)