Lines Matching full:pr
52 static int acpi_processor_get_platform_limit(struct acpi_processor *pr) in acpi_processor_get_platform_limit() argument
58 if (!pr) in acpi_processor_get_platform_limit()
65 status = acpi_evaluate_integer(pr->handle, "_PPC", NULL, &ppc); in acpi_processor_get_platform_limit()
70 acpi_evaluation_failure_warn(pr->handle, "_PPC", status); in acpi_processor_get_platform_limit()
75 pr_debug("CPU %d: _PPC is %d - frequency %s limited\n", pr->id, in acpi_processor_get_platform_limit()
78 pr->performance_platform_limit = (int)ppc; in acpi_processor_get_platform_limit()
80 if (ppc >= pr->performance->state_count || in acpi_processor_get_platform_limit()
81 unlikely(!freq_qos_request_active(&pr->perflib_req))) in acpi_processor_get_platform_limit()
84 ret = freq_qos_update_request(&pr->perflib_req, in acpi_processor_get_platform_limit()
85 pr->performance->states[ppc].core_frequency * 1000); in acpi_processor_get_platform_limit()
88 pr->id, ret); in acpi_processor_get_platform_limit()
109 void acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag) in acpi_processor_ppc_has_changed() argument
113 if (ignore_ppc || !pr->performance) { in acpi_processor_ppc_has_changed()
119 acpi_processor_ppc_ost(pr->handle, 1); in acpi_processor_ppc_has_changed()
123 ret = acpi_processor_get_platform_limit(pr); in acpi_processor_ppc_has_changed()
130 acpi_processor_ppc_ost(pr->handle, 1); in acpi_processor_ppc_has_changed()
132 acpi_processor_ppc_ost(pr->handle, 0); in acpi_processor_ppc_has_changed()
135 cpufreq_update_limits(pr->id); in acpi_processor_ppc_has_changed()
140 struct acpi_processor *pr; in acpi_processor_get_bios_limit() local
142 pr = per_cpu(processors, cpu); in acpi_processor_get_bios_limit()
143 if (!pr || !pr->performance || !pr->performance->state_count) in acpi_processor_get_bios_limit()
145 *limit = pr->performance->states[pr->performance_platform_limit]. in acpi_processor_get_bios_limit()
162 struct acpi_processor *pr = per_cpu(processors, cpu); in acpi_processor_ppc_init() local
165 if (!pr) in acpi_processor_ppc_init()
169 &pr->perflib_req, in acpi_processor_ppc_init()
182 struct acpi_processor *pr = per_cpu(processors, cpu); in acpi_processor_ppc_exit() local
184 if (pr) in acpi_processor_ppc_exit()
185 freq_qos_remove_request(&pr->perflib_req); in acpi_processor_ppc_exit()
189 static int acpi_processor_get_performance_control(struct acpi_processor *pr) in acpi_processor_get_performance_control() argument
197 status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer); in acpi_processor_get_performance_control()
199 acpi_evaluation_failure_warn(pr->handle, "_PCT", status); in acpi_processor_get_performance_control()
224 memcpy(&pr->performance->control_register, obj.buffer.pointer, in acpi_processor_get_performance_control()
241 memcpy(&pr->performance->status_register, obj.buffer.pointer, in acpi_processor_get_performance_control()
285 static int acpi_processor_get_performance_states(struct acpi_processor *pr) in acpi_processor_get_performance_states() argument
296 status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); in acpi_processor_get_performance_states()
298 acpi_evaluation_failure_warn(pr->handle, "_PSS", status); in acpi_processor_get_performance_states()
309 acpi_handle_debug(pr->handle, "Found %d performance states\n", in acpi_processor_get_performance_states()
312 pr->performance->state_count = pss->package.count; in acpi_processor_get_performance_states()
313 pr->performance->states = in acpi_processor_get_performance_states()
317 if (!pr->performance->states) { in acpi_processor_get_performance_states()
322 for (i = 0; i < pr->performance->state_count; i++) { in acpi_processor_get_performance_states()
324 struct acpi_processor_px *px = &(pr->performance->states[i]); in acpi_processor_get_performance_states()
329 acpi_handle_debug(pr->handle, "Extracting state %d\n", i); in acpi_processor_get_performance_states()
334 acpi_handle_warn(pr->handle, "Invalid _PSS data: %s\n", in acpi_processor_get_performance_states()
337 kfree(pr->performance->states); in acpi_processor_get_performance_states()
343 acpi_handle_debug(pr->handle, in acpi_processor_get_performance_states()
360 pr->id, px->core_frequency); in acpi_processor_get_performance_states()
368 memcpy(&(pr->performance->states[last_invalid]), in acpi_processor_get_performance_states()
377 "No valid BIOS _PSS frequency found for processor %d\n", pr->id); in acpi_processor_get_performance_states()
379 kfree(pr->performance->states); in acpi_processor_get_performance_states()
380 pr->performance->states = NULL; in acpi_processor_get_performance_states()
384 pr->performance->state_count = last_invalid; in acpi_processor_get_performance_states()
392 int acpi_processor_get_performance_info(struct acpi_processor *pr) in acpi_processor_get_performance_info() argument
396 if (!pr || !pr->performance || !pr->handle) in acpi_processor_get_performance_info()
399 if (!acpi_has_method(pr->handle, "_PCT")) { in acpi_processor_get_performance_info()
400 acpi_handle_debug(pr->handle, in acpi_processor_get_performance_info()
405 result = acpi_processor_get_performance_control(pr); in acpi_processor_get_performance_info()
409 result = acpi_processor_get_performance_states(pr); in acpi_processor_get_performance_info()
415 result = acpi_processor_get_platform_limit(pr); in acpi_processor_get_performance_info()
425 if (acpi_has_method(pr->handle, "_PPC")) { in acpi_processor_get_performance_info()
575 struct acpi_processor *pr; in acpi_processor_preregister_performance() local
587 * changing pr->performance if it has. Check input data as well. in acpi_processor_preregister_performance()
590 pr = per_cpu(processors, i); in acpi_processor_preregister_performance()
591 if (!pr) { in acpi_processor_preregister_performance()
596 if (pr->performance) { in acpi_processor_preregister_performance()
609 pr = per_cpu(processors, i); in acpi_processor_preregister_performance()
610 if (!pr) in acpi_processor_preregister_performance()
613 pr->performance = per_cpu_ptr(performance, i); in acpi_processor_preregister_performance()
614 pdomain = &(pr->performance->domain_info); in acpi_processor_preregister_performance()
615 if (acpi_processor_get_psd(pr->handle, pdomain)) { in acpi_processor_preregister_performance()
628 pr = per_cpu(processors, i); in acpi_processor_preregister_performance()
629 if (!pr) in acpi_processor_preregister_performance()
635 pdomain = &(pr->performance->domain_info); in acpi_processor_preregister_performance()
636 cpumask_set_cpu(i, pr->performance->shared_cpu_map); in acpi_processor_preregister_performance()
644 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL; in acpi_processor_preregister_performance()
646 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_HW; in acpi_processor_preregister_performance()
648 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ANY; in acpi_processor_preregister_performance()
675 cpumask_set_cpu(j, pr->performance->shared_cpu_map); in acpi_processor_preregister_performance()
691 pr->performance->shared_type; in acpi_processor_preregister_performance()
693 pr->performance->shared_cpu_map); in acpi_processor_preregister_performance()
699 pr = per_cpu(processors, i); in acpi_processor_preregister_performance()
700 if (!pr || !pr->performance) in acpi_processor_preregister_performance()
705 cpumask_clear(pr->performance->shared_cpu_map); in acpi_processor_preregister_performance()
706 cpumask_set_cpu(i, pr->performance->shared_cpu_map); in acpi_processor_preregister_performance()
707 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_NONE; in acpi_processor_preregister_performance()
709 pr->performance = NULL; /* Will be set for real in register */ in acpi_processor_preregister_performance()
723 struct acpi_processor *pr; in acpi_processor_register_performance() local
730 pr = per_cpu(processors, cpu); in acpi_processor_register_performance()
731 if (!pr) { in acpi_processor_register_performance()
736 if (pr->performance) { in acpi_processor_register_performance()
743 pr->performance = performance; in acpi_processor_register_performance()
745 if (acpi_processor_get_performance_info(pr)) { in acpi_processor_register_performance()
746 pr->performance = NULL; in acpi_processor_register_performance()
759 struct acpi_processor *pr; in acpi_processor_unregister_performance() local
763 pr = per_cpu(processors, cpu); in acpi_processor_unregister_performance()
764 if (!pr) { in acpi_processor_unregister_performance()
769 if (pr->performance) in acpi_processor_unregister_performance()
770 kfree(pr->performance->states); in acpi_processor_unregister_performance()
771 pr->performance = NULL; in acpi_processor_unregister_performance()