Lines Matching refs:cpuid

80 static void parse_cpuid(const char *arg, int *cpuid)  in parse_cpuid()  argument
82 if ( sscanf(arg, "%d", cpuid) != 1 || *cpuid < 0 ) in parse_cpuid()
89 *cpuid = -1; in parse_cpuid()
94 int *cpuid, int *val, const char *what) in parse_cpuid_and_int() argument
103 parse_cpuid(argv[0], cpuid); in parse_cpuid_and_int()
112 static void print_cxstat(int cpuid, struct xc_cx_stat *cxstat) in print_cxstat() argument
116 printf("cpu id : %d\n", cpuid); in print_cxstat()
139 static int get_cxstat_by_cpuid(xc_interface *xc_handle, int cpuid, struct xc_cx_stat *cxstat) in get_cxstat_by_cpuid() argument
144 ret = xc_pm_get_max_cx(xc_handle, cpuid, &max_cx_num); in get_cxstat_by_cpuid()
172 ret = xc_pm_get_cxstat(xc_handle, cpuid, cxstat); in get_cxstat_by_cpuid()
201 static int show_cxstat_by_cpuid(xc_interface *xc_handle, int cpuid) in show_cxstat_by_cpuid() argument
206 ret = get_cxstat_by_cpuid(xc_handle, cpuid, &cxstatinfo); in show_cxstat_by_cpuid()
215 print_cxstat(cpuid, &cxstatinfo); in show_cxstat_by_cpuid()
226 int cpuid = -1; in cxstat_func() local
229 parse_cpuid(argv[0], &cpuid); in cxstat_func()
233 if ( cpuid < 0 ) in cxstat_func()
242 show_cxstat_by_cpuid(xc_handle, cpuid); in cxstat_func()
245 static void print_pxstat(int cpuid, struct xc_px_stat *pxstat) in print_pxstat() argument
249 printf("cpu id : %d\n", cpuid); in print_pxstat()
270 static int get_pxstat_by_cpuid(xc_interface *xc_handle, int cpuid, struct xc_px_stat *pxstat) in get_pxstat_by_cpuid() argument
275 ret = xc_pm_get_max_px(xc_handle, cpuid, &max_px_num); in get_pxstat_by_cpuid()
293 ret = xc_pm_get_pxstat(xc_handle, cpuid, pxstat); in get_pxstat_by_cpuid()
307 static int get_avgfreq_by_cpuid(xc_interface *xc_handle, int cpuid, int *avgfreq) in get_avgfreq_by_cpuid() argument
311 ret = xc_get_cpufreq_avgfreq(xc_handle, cpuid, avgfreq); in get_avgfreq_by_cpuid()
318 static int show_pxstat_by_cpuid(xc_interface *xc_handle, int cpuid) in show_pxstat_by_cpuid() argument
323 ret = get_pxstat_by_cpuid(xc_handle, cpuid, &pxstatinfo); in show_pxstat_by_cpuid()
327 print_pxstat(cpuid, &pxstatinfo); in show_pxstat_by_cpuid()
336 int cpuid = -1; in pxstat_func() local
339 parse_cpuid(argv[0], &cpuid); in pxstat_func()
341 if ( cpuid < 0 ) in pxstat_func()
350 show_pxstat_by_cpuid(xc_handle, cpuid); in pxstat_func()
353 static int show_cpufreq_by_cpuid(xc_interface *xc_handle, int cpuid) in show_cpufreq_by_cpuid() argument
358 ret = get_avgfreq_by_cpuid(xc_handle, cpuid, &average_cpufreq); in show_cpufreq_by_cpuid()
362 printf("cpu id : %d\n", cpuid); in show_cpufreq_by_cpuid()
370 int cpuid = -1; in cpufreq_func() local
373 parse_cpuid(argv[0], &cpuid); in cpufreq_func()
375 if ( cpuid < 0 ) in cpufreq_func()
384 show_cpufreq_by_cpuid(xc_handle, cpuid); in cpufreq_func()
698 static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para *p_cpufreq) in print_cpufreq_para() argument
702 printf("cpu id : %d\n", cpuid); in print_cpufreq_para()
759 static int show_cpufreq_para_by_cpuid(xc_interface *xc_handle, int cpuid) in show_cpufreq_para_by_cpuid() argument
787 cpuid); in show_cpufreq_para_by_cpuid()
796 cpuid); in show_cpufreq_para_by_cpuid()
805 cpuid); in show_cpufreq_para_by_cpuid()
810 ret = xc_get_cpufreq_para(xc_handle, cpuid, p_cpufreq); in show_cpufreq_para_by_cpuid()
814 print_cpufreq_para(cpuid, p_cpufreq); in show_cpufreq_para_by_cpuid()
823 cpuid); in show_cpufreq_para_by_cpuid()
835 int cpuid = -1; in cpufreq_para_func() local
838 parse_cpuid(argv[0], &cpuid); in cpufreq_para_func()
840 if ( cpuid < 0 ) in cpufreq_para_func()
849 show_cpufreq_para_by_cpuid(xc_handle, cpuid); in cpufreq_para_func()
854 int cpuid = -1, freq = -1; in scaling_max_freq_func() local
856 parse_cpuid_and_int(argc, argv, &cpuid, &freq, "frequency"); in scaling_max_freq_func()
858 if ( cpuid < 0 ) in scaling_max_freq_func()
869 if ( xc_set_cpufreq_para(xc_handle, cpuid, SCALING_MAX_FREQ, freq) ) in scaling_max_freq_func()
877 int cpuid = -1, freq = -1; in scaling_min_freq_func() local
879 parse_cpuid_and_int(argc, argv, &cpuid, &freq, "frequency"); in scaling_min_freq_func()
881 if ( cpuid < 0 ) in scaling_min_freq_func()
892 if ( xc_set_cpufreq_para(xc_handle, cpuid, SCALING_MIN_FREQ, freq) ) in scaling_min_freq_func()
900 int cpuid = -1, speed = -1; in scaling_speed_func() local
902 parse_cpuid_and_int(argc, argv, &cpuid, &speed, "speed"); in scaling_speed_func()
904 if ( cpuid < 0 ) in scaling_speed_func()
915 if ( xc_set_cpufreq_para(xc_handle, cpuid, SCALING_SETSPEED, speed) ) in scaling_speed_func()
923 int cpuid = -1, rate = -1; in scaling_sampling_rate_func() local
925 parse_cpuid_and_int(argc, argv, &cpuid, &rate, "rate"); in scaling_sampling_rate_func()
927 if ( cpuid < 0 ) in scaling_sampling_rate_func()
938 if ( xc_set_cpufreq_para(xc_handle, cpuid, SAMPLING_RATE, rate) ) in scaling_sampling_rate_func()
946 int cpuid = -1, threshold = -1; in scaling_up_threshold_func() local
948 parse_cpuid_and_int(argc, argv, &cpuid, &threshold, "threshold"); in scaling_up_threshold_func()
950 if ( cpuid < 0 ) in scaling_up_threshold_func()
961 if ( xc_set_cpufreq_para(xc_handle, cpuid, UP_THRESHOLD, threshold) ) in scaling_up_threshold_func()
969 int cpuid = -1; in scaling_governor_func() local
974 parse_cpuid(argv[0], &cpuid); in scaling_governor_func()
985 if ( cpuid < 0 ) in scaling_governor_func()
995 if ( xc_set_cpufreq_gov(xc_handle, cpuid, name) ) in scaling_governor_func()
1122 int cpuid = -1; in enable_turbo_mode() local
1125 parse_cpuid(argv[0], &cpuid); in enable_turbo_mode()
1127 if ( cpuid < 0 ) in enable_turbo_mode()
1138 else if ( xc_enable_turbo(xc_handle, cpuid) ) in enable_turbo_mode()
1145 int cpuid = -1; in disable_turbo_mode() local
1148 parse_cpuid(argv[0], &cpuid); in disable_turbo_mode()
1150 if ( cpuid < 0 ) in disable_turbo_mode()
1161 else if ( xc_disable_turbo(xc_handle, cpuid) ) in disable_turbo_mode()