Lines Matching refs:ret
12 int ret; in isst_write_pm_config() local
19 ret = isst_send_mbox_command(cpu, WRITE_PM_CONFIG, PM_FEATURE, 0, req, in isst_write_pm_config()
21 if (ret) in isst_write_pm_config()
22 return ret; in isst_write_pm_config()
32 int ret; in isst_read_pm_config() local
34 ret = isst_send_mbox_command(cpu, READ_PM_CONFIG, PM_FEATURE, 0, 0, in isst_read_pm_config()
36 if (ret) in isst_read_pm_config()
37 return ret; in isst_read_pm_config()
50 int ret; in isst_get_ctdp_levels() local
52 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_ctdp_levels()
54 if (ret) { in isst_get_ctdp_levels()
79 int ret; in isst_get_ctdp_control() local
81 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_ctdp_control()
84 if (ret) in isst_get_ctdp_control()
85 return ret; in isst_get_ctdp_control()
92 ret = isst_read_pm_config(cpu, &cp_state, &cp_cap); in isst_get_ctdp_control()
93 if (ret) { in isst_get_ctdp_control()
113 int ret; in isst_get_tdp_info() local
115 ret = isst_send_mbox_command(cpu, CONFIG_TDP, CONFIG_TDP_GET_TDP_INFO, in isst_get_tdp_info()
117 if (ret) { in isst_get_tdp_info()
119 return ret; in isst_get_tdp_info()
136 int ret; in isst_get_pwr_info() local
138 ret = isst_send_mbox_command(cpu, CONFIG_TDP, CONFIG_TDP_GET_PWR_INFO, in isst_get_pwr_info()
140 if (ret) in isst_get_pwr_info()
141 return ret; in isst_get_pwr_info()
158 int ret; in isst_get_uncore_p0_p1_info() local
159 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_uncore_p0_p1_info()
162 if (ret) { in isst_get_uncore_p0_p1_info()
180 int ret; in isst_get_p1_info() local
181 ret = isst_send_mbox_command(cpu, CONFIG_TDP, CONFIG_TDP_GET_P1_INFO, 0, in isst_get_p1_info()
183 if (ret) { in isst_get_p1_info()
203 int ret; in isst_get_uncore_mem_freq() local
204 ret = isst_send_mbox_command(cpu, CONFIG_TDP, CONFIG_TDP_GET_MEM_FREQ, in isst_get_uncore_mem_freq()
206 if (ret) { in isst_get_uncore_mem_freq()
221 int ret; in isst_get_tjmax_info() local
223 ret = isst_send_mbox_command(cpu, CONFIG_TDP, CONFIG_TDP_GET_TJMAX_INFO, in isst_get_tjmax_info()
225 if (ret) in isst_get_tjmax_info()
226 return ret; in isst_get_tjmax_info()
241 int i, ret; in isst_get_coremask_info() local
248 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_coremask_info()
251 if (ret) in isst_get_coremask_info()
252 return ret; in isst_get_coremask_info()
274 int ret; in isst_get_get_trl_from_msr() local
276 ret = isst_send_msr_command(cpu, 0x1AD, 0, &msr_trl); in isst_get_get_trl_from_msr()
277 if (ret) in isst_get_get_trl_from_msr()
278 return ret; in isst_get_get_trl_from_msr()
295 int ret; in isst_get_get_trl() local
298 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_get_trl()
301 if (ret) in isst_get_get_trl()
302 return ret; in isst_get_get_trl()
314 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_get_trl()
317 if (ret) in isst_get_get_trl()
318 return ret; in isst_get_get_trl()
333 int ret; in isst_get_trl_bucket_info() local
339 ret = isst_send_msr_command(cpu, 0x1ae, 0, buckets_info); in isst_get_trl_bucket_info()
340 if (ret) in isst_get_trl_bucket_info()
341 return ret; in isst_get_trl_bucket_info()
352 int ret; in isst_set_tdp_level_msr() local
364 ret = isst_send_msr_command(cpu, 0x64b, 1, &level); in isst_set_tdp_level_msr()
365 if (ret) in isst_set_tdp_level_msr()
366 return ret; in isst_set_tdp_level_msr()
376 int ret; in isst_set_tdp_level() local
385 ret = isst_send_mbox_command(cpu, CONFIG_TDP, CONFIG_TDP_SET_LEVEL, 0, in isst_set_tdp_level()
387 if (ret) { in isst_set_tdp_level()
389 return ret; in isst_set_tdp_level()
399 int i, ret, max_punit_core, max_mask_index; in isst_get_pbf_info() local
402 ret = isst_get_ctdp_levels(cpu, &pkg_dev); in isst_get_pbf_info()
403 if (ret) { in isst_get_pbf_info()
405 return ret; in isst_get_pbf_info()
413 ret = isst_get_ctdp_control(cpu, level, &ctdp_level); in isst_get_pbf_info()
414 if (ret) in isst_get_pbf_info()
415 return ret; in isst_get_pbf_info()
431 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_pbf_info()
434 if (ret) in isst_get_pbf_info()
449 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_pbf_info()
452 if (ret) in isst_get_pbf_info()
453 return ret; in isst_get_pbf_info()
462 ret = isst_send_mbox_command( in isst_get_pbf_info()
464 if (ret) in isst_get_pbf_info()
465 return ret; in isst_get_pbf_info()
472 ret = isst_send_mbox_command( in isst_get_pbf_info()
474 if (ret) in isst_get_pbf_info()
475 return ret; in isst_get_pbf_info()
496 int ret; in isst_set_pbf_fact_status() local
498 ret = isst_get_ctdp_levels(cpu, &pkg_dev); in isst_set_pbf_fact_status()
499 if (ret) in isst_set_pbf_fact_status()
504 ret = isst_get_ctdp_control(cpu, current_level, &ctdp_level); in isst_set_pbf_fact_status()
505 if (ret) in isst_set_pbf_fact_status()
506 return ret; in isst_set_pbf_fact_status()
530 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_set_pbf_fact_status()
532 if (ret) in isst_set_pbf_fact_status()
533 return ret; in isst_set_pbf_fact_status()
545 int i, k, ret; in isst_get_fact_bucket_info() local
550 ret = isst_send_mbox_command( in isst_get_fact_bucket_info()
554 if (ret) in isst_get_fact_bucket_info()
555 return ret; in isst_get_fact_bucket_info()
571 ret = isst_send_mbox_command( in isst_get_fact_bucket_info()
575 if (ret) in isst_get_fact_bucket_info()
576 return ret; in isst_get_fact_bucket_info()
611 int j, ret, print; in isst_get_fact_info() local
613 ret = isst_get_ctdp_levels(cpu, &pkg_dev); in isst_get_fact_info()
614 if (ret) { in isst_get_fact_info()
616 return ret; in isst_get_fact_info()
624 ret = isst_get_ctdp_control(cpu, level, &ctdp_level); in isst_get_fact_info()
625 if (ret) in isst_get_fact_info()
626 return ret; in isst_get_fact_info()
633 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_fact_info()
636 if (ret) in isst_get_fact_info()
637 return ret; in isst_get_fact_info()
646 ret = isst_get_fact_bucket_info(cpu, level, fact_info->bucket_info); in isst_get_fact_info()
647 if (ret) in isst_get_fact_info()
648 return ret; in isst_get_fact_info()
670 int ret; in isst_set_trl() local
675 ret = isst_send_msr_command(cpu, 0x1AD, 1, &trl); in isst_set_trl()
676 if (ret) in isst_set_trl()
677 return ret; in isst_set_trl()
685 int ret; in isst_set_trl_from_current_tdp() local
694 ret = isst_get_ctdp_levels(cpu, &pkg_dev); in isst_set_trl_from_current_tdp()
695 if (ret) in isst_set_trl_from_current_tdp()
696 return ret; in isst_set_trl_from_current_tdp()
698 ret = isst_get_get_trl(cpu, pkg_dev.current_level, 0, trl); in isst_set_trl_from_current_tdp()
699 if (ret) in isst_set_trl_from_current_tdp()
700 return ret; in isst_set_trl_from_current_tdp()
709 ret = isst_send_msr_command(cpu, 0x1AD, 1, &msr_trl); in isst_set_trl_from_current_tdp()
710 if (ret) in isst_set_trl_from_current_tdp()
711 return ret; in isst_set_trl_from_current_tdp()
720 int ret; in isst_get_config_tdp_lock_status() local
722 ret = isst_send_msr_command(cpu, 0x64b, 0, &tdp_control); in isst_get_config_tdp_lock_status()
723 if (ret) in isst_get_config_tdp_lock_status()
724 return ret; in isst_get_config_tdp_lock_status()
726 ret = !!(tdp_control & BIT(31)); in isst_get_config_tdp_lock_status()
728 return ret; in isst_get_config_tdp_lock_status()
750 int i, ret, valid = 0; in isst_get_process_ctdp() local
755 ret = isst_get_ctdp_levels(cpu, pkg_dev); in isst_get_process_ctdp()
756 if (ret) in isst_get_process_ctdp()
757 return ret; in isst_get_process_ctdp()
786 ret = isst_get_ctdp_control(cpu, i, ctdp_level); in isst_get_process_ctdp()
787 if (ret) in isst_get_process_ctdp()
795 ret = isst_get_pbf_info(cpu, i, &ctdp_level->pbf_info); in isst_get_process_ctdp()
796 if (!ret) in isst_get_process_ctdp()
801 ret = isst_get_fact_info(cpu, i, 0xff, in isst_get_process_ctdp()
803 if (ret) in isst_get_process_ctdp()
804 return ret; in isst_get_process_ctdp()
821 ret = isst_get_tdp_info(cpu, i, ctdp_level); in isst_get_process_ctdp()
822 if (ret) in isst_get_process_ctdp()
823 return ret; in isst_get_process_ctdp()
825 ret = isst_get_pwr_info(cpu, i, ctdp_level); in isst_get_process_ctdp()
826 if (ret) in isst_get_process_ctdp()
827 return ret; in isst_get_process_ctdp()
829 ret = isst_get_tjmax_info(cpu, i, ctdp_level); in isst_get_process_ctdp()
830 if (ret) in isst_get_process_ctdp()
831 return ret; in isst_get_process_ctdp()
835 ret = isst_get_coremask_info(cpu, i, ctdp_level); in isst_get_process_ctdp()
836 if (ret) in isst_get_process_ctdp()
837 return ret; in isst_get_process_ctdp()
839 ret = isst_get_trl_bucket_info(cpu, &ctdp_level->buckets_info); in isst_get_process_ctdp()
840 if (ret) in isst_get_process_ctdp()
841 return ret; in isst_get_process_ctdp()
843 ret = isst_get_get_trl(cpu, i, 0, in isst_get_process_ctdp()
845 if (ret) in isst_get_process_ctdp()
846 return ret; in isst_get_process_ctdp()
848 ret = isst_get_get_trl(cpu, i, 1, in isst_get_process_ctdp()
850 if (ret) in isst_get_process_ctdp()
851 return ret; in isst_get_process_ctdp()
853 ret = isst_get_get_trl(cpu, i, 2, in isst_get_process_ctdp()
855 if (ret) in isst_get_process_ctdp()
856 return ret; in isst_get_process_ctdp()
872 int ret; in isst_clos_get_clos_information() local
874 ret = isst_send_mbox_command(cpu, CONFIG_CLOS, CLOS_PM_QOS_CONFIG, 0, 0, in isst_clos_get_clos_information()
876 if (ret) in isst_clos_get_clos_information()
877 return ret; in isst_clos_get_clos_information()
897 int ret; in isst_pm_qos_config() local
903 ret = isst_get_ctdp_levels(cpu, &pkg_dev); in isst_pm_qos_config()
904 if (ret) { in isst_pm_qos_config()
906 return ret; in isst_pm_qos_config()
909 ret = isst_get_ctdp_control(cpu, pkg_dev.current_level, in isst_pm_qos_config()
911 if (ret) in isst_pm_qos_config()
912 return ret; in isst_pm_qos_config()
918 ret = isst_write_pm_config(cpu, 0); in isst_pm_qos_config()
919 if (ret) in isst_pm_qos_config()
922 ret = isst_write_pm_config(cpu, 1); in isst_pm_qos_config()
923 if (ret) in isst_pm_qos_config()
927 ret = isst_send_mbox_command(cpu, CONFIG_CLOS, CLOS_PM_QOS_CONFIG, 0, 0, in isst_pm_qos_config()
929 if (ret) { in isst_pm_qos_config()
931 return ret; in isst_pm_qos_config()
951 ret = isst_send_mbox_command(cpu, CONFIG_CLOS, CLOS_PM_QOS_CONFIG, in isst_pm_qos_config()
953 if (ret) in isst_pm_qos_config()
954 return ret; in isst_pm_qos_config()
965 int ret; in isst_pm_get_clos() local
967 ret = isst_send_mbox_command(cpu, CONFIG_CLOS, CLOS_PM_CLOS, clos, 0, in isst_pm_get_clos()
969 if (ret) in isst_pm_get_clos()
970 return ret; in isst_pm_get_clos()
988 int ret; in isst_set_clos() local
998 ret = isst_send_mbox_command(cpu, CONFIG_CLOS, CLOS_PM_CLOS, param, req, in isst_set_clos()
1000 if (ret) in isst_set_clos()
1001 return ret; in isst_set_clos()
1012 int core_id, ret; in isst_clos_get_assoc_status() local
1017 ret = isst_send_mbox_command(cpu, CONFIG_CLOS, CLOS_PQR_ASSOC, param, 0, in isst_clos_get_assoc_status()
1019 if (ret) in isst_clos_get_assoc_status()
1020 return ret; in isst_clos_get_assoc_status()
1033 int core_id, ret; in isst_clos_associate() local
1039 ret = isst_send_mbox_command(cpu, CONFIG_CLOS, CLOS_PQR_ASSOC, param, in isst_clos_associate()
1041 if (ret) in isst_clos_associate()
1042 return ret; in isst_clos_associate()