Lines Matching refs:_pr
50 static int push_cxx_to_hypervisor(struct acpi_processor *_pr) in push_cxx_to_hypervisor() argument
55 .u.set_pminfo.id = _pr->acpi_id, in push_cxx_to_hypervisor()
63 dst_cx_states = kcalloc(_pr->power.count, in push_cxx_to_hypervisor()
68 for (ok = 0, i = 1; i <= _pr->power.count; i++) { in push_cxx_to_hypervisor()
69 cx = &_pr->power.states[i]; in push_cxx_to_hypervisor()
98 pr_debug("No _Cx for ACPI CPU %u\n", _pr->acpi_id); in push_cxx_to_hypervisor()
103 op.u.set_pminfo.power.flags.bm_control = _pr->flags.bm_control; in push_cxx_to_hypervisor()
104 op.u.set_pminfo.power.flags.bm_check = _pr->flags.bm_check; in push_cxx_to_hypervisor()
105 op.u.set_pminfo.power.flags.has_cst = _pr->flags.has_cst; in push_cxx_to_hypervisor()
107 _pr->flags.power_setup_done; in push_cxx_to_hypervisor()
115 pr_debug("ACPI CPU%u - C-states uploaded.\n", _pr->acpi_id); in push_cxx_to_hypervisor()
116 for (i = 1; i <= _pr->power.count; i++) { in push_cxx_to_hypervisor()
117 cx = &_pr->power.states[i]; in push_cxx_to_hypervisor()
128 ret, _pr->acpi_id); in push_cxx_to_hypervisor()
135 xen_copy_pss_data(struct acpi_processor *_pr, in xen_copy_pss_data() argument
144 dst_states = kcalloc(_pr->performance->state_count, in xen_copy_pss_data()
149 dst_perf->state_count = _pr->performance->state_count; in xen_copy_pss_data()
150 for (i = 0; i < _pr->performance->state_count; i++) { in xen_copy_pss_data()
152 memcpy(&(dst_states[i]), &(_pr->performance->states[i]), in xen_copy_pss_data()
157 static int xen_copy_psd_data(struct acpi_processor *_pr, in xen_copy_psd_data() argument
168 dst->shared_type = _pr->performance->shared_type; in xen_copy_psd_data()
170 pdomain = &(_pr->performance->domain_info); in xen_copy_psd_data()
203 static int push_pxx_to_hypervisor(struct acpi_processor *_pr) in push_pxx_to_hypervisor() argument
209 .u.set_pminfo.id = _pr->acpi_id, in push_pxx_to_hypervisor()
217 dst_perf->platform_limit = _pr->performance_platform_limit; in push_pxx_to_hypervisor()
219 xen_copy_pct_data(&(_pr->performance->control_register), in push_pxx_to_hypervisor()
221 xen_copy_pct_data(&(_pr->performance->status_register), in push_pxx_to_hypervisor()
224 dst_states = xen_copy_pss_data(_pr, dst_perf); in push_pxx_to_hypervisor()
229 if (!xen_copy_psd_data(_pr, dst_perf)) in push_pxx_to_hypervisor()
234 _pr->acpi_id, dst_perf->flags); in push_pxx_to_hypervisor()
246 perf = _pr->performance; in push_pxx_to_hypervisor()
247 pr_debug("ACPI CPU%u - P-states uploaded.\n", _pr->acpi_id); in push_pxx_to_hypervisor()
260 ret, _pr->acpi_id); in push_pxx_to_hypervisor()
267 static int upload_pm_data(struct acpi_processor *_pr) in upload_pm_data() argument
272 if (__test_and_set_bit(_pr->acpi_id, acpi_ids_done)) { in upload_pm_data()
276 if (_pr->flags.power) in upload_pm_data()
277 err = push_cxx_to_hypervisor(_pr); in upload_pm_data()
279 if (_pr->performance && _pr->performance->states) in upload_pm_data()
280 err |= push_pxx_to_hypervisor(_pr); in upload_pm_data()
470 struct acpi_processor *_pr; in xen_upload_processor_pm_data() local
471 _pr = per_cpu(processors, i /* APIC ID */); in xen_upload_processor_pm_data()
472 if (!_pr) in xen_upload_processor_pm_data()
478 memcpy(pr_backup, _pr, sizeof(struct acpi_processor)); in xen_upload_processor_pm_data()
480 (void)upload_pm_data(_pr); in xen_upload_processor_pm_data()