Lines Matching refs:_pr
51 static int push_cxx_to_hypervisor(struct acpi_processor *_pr) in push_cxx_to_hypervisor() argument
56 .u.set_pminfo.id = _pr->acpi_id, in push_cxx_to_hypervisor()
64 dst_cx_states = kcalloc(_pr->power.count, in push_cxx_to_hypervisor()
69 for (ok = 0, i = 1; i <= _pr->power.count; i++) { in push_cxx_to_hypervisor()
70 cx = &_pr->power.states[i]; in push_cxx_to_hypervisor()
99 pr_debug("No _Cx for ACPI CPU %u\n", _pr->acpi_id); in push_cxx_to_hypervisor()
104 op.u.set_pminfo.power.flags.bm_control = _pr->flags.bm_control; in push_cxx_to_hypervisor()
105 op.u.set_pminfo.power.flags.bm_check = _pr->flags.bm_check; in push_cxx_to_hypervisor()
106 op.u.set_pminfo.power.flags.has_cst = _pr->flags.has_cst; in push_cxx_to_hypervisor()
108 _pr->flags.power_setup_done; in push_cxx_to_hypervisor()
116 pr_debug("ACPI CPU%u - C-states uploaded.\n", _pr->acpi_id); in push_cxx_to_hypervisor()
117 for (i = 1; i <= _pr->power.count; i++) { in push_cxx_to_hypervisor()
118 cx = &_pr->power.states[i]; in push_cxx_to_hypervisor()
129 ret, _pr->acpi_id); in push_cxx_to_hypervisor()
136 xen_copy_pss_data(struct acpi_processor *_pr, in xen_copy_pss_data() argument
145 dst_states = kcalloc(_pr->performance->state_count, in xen_copy_pss_data()
150 dst_perf->state_count = _pr->performance->state_count; in xen_copy_pss_data()
151 for (i = 0; i < _pr->performance->state_count; i++) { in xen_copy_pss_data()
153 memcpy(&(dst_states[i]), &(_pr->performance->states[i]), in xen_copy_pss_data()
158 static int xen_copy_psd_data(struct acpi_processor *_pr, in xen_copy_psd_data() argument
169 dst->shared_type = _pr->performance->shared_type; in xen_copy_psd_data()
171 pdomain = &(_pr->performance->domain_info); in xen_copy_psd_data()
204 static int push_pxx_to_hypervisor(struct acpi_processor *_pr) in push_pxx_to_hypervisor() argument
210 .u.set_pminfo.id = _pr->acpi_id, in push_pxx_to_hypervisor()
218 dst_perf->platform_limit = _pr->performance_platform_limit; in push_pxx_to_hypervisor()
220 xen_copy_pct_data(&(_pr->performance->control_register), in push_pxx_to_hypervisor()
222 xen_copy_pct_data(&(_pr->performance->status_register), in push_pxx_to_hypervisor()
225 dst_states = xen_copy_pss_data(_pr, dst_perf); in push_pxx_to_hypervisor()
230 if (!xen_copy_psd_data(_pr, dst_perf)) in push_pxx_to_hypervisor()
235 _pr->acpi_id, dst_perf->flags); in push_pxx_to_hypervisor()
247 perf = _pr->performance; in push_pxx_to_hypervisor()
248 pr_debug("ACPI CPU%u - P-states uploaded.\n", _pr->acpi_id); in push_pxx_to_hypervisor()
261 ret, _pr->acpi_id); in push_pxx_to_hypervisor()
268 static int upload_pm_data(struct acpi_processor *_pr) in upload_pm_data() argument
273 if (__test_and_set_bit(_pr->acpi_id, acpi_ids_done)) { in upload_pm_data()
277 if (_pr->flags.power) in upload_pm_data()
278 err = push_cxx_to_hypervisor(_pr); in upload_pm_data()
280 if (_pr->performance && _pr->performance->states) in upload_pm_data()
281 err |= push_pxx_to_hypervisor(_pr); in upload_pm_data()
471 struct acpi_processor *_pr; in xen_upload_processor_pm_data() local
472 _pr = per_cpu(processors, i /* APIC ID */); in xen_upload_processor_pm_data()
473 if (!_pr) in xen_upload_processor_pm_data()
479 memcpy(pr_backup, _pr, sizeof(struct acpi_processor)); in xen_upload_processor_pm_data()
481 (void)upload_pm_data(_pr); in xen_upload_processor_pm_data()