Lines Matching +full:activate +full:- +full:to +full:- +full:activate

1 // SPDX-License-Identifier: GPL-2.0-only
6 * This pseries platform device driver provides access to
34 /* Helper Routines to convert between drc_index to cpu numbers */
48 /* Convert logical cpu number to core number */ in cpu_to_drc_index()
51 info = of_find_property(dn, "ibm,drc-info", NULL); in cpu_to_drc_index()
79 * The first element of ibm,drc-indexes array is the in cpu_to_drc_index()
82 * to core number thread_index. in cpu_to_drc_index()
84 rc = of_property_read_u32_index(dn, "ibm,drc-indexes", in cpu_to_drc_index()
90 rc = of_property_read_u32_index(dn, "ibm,drc-indexes", in cpu_to_drc_index()
120 info = of_find_property(dn, "ibm,drc-info", NULL); in drc_index_to_cpu()
143 cpu += ((drc_index - drc.drc_index_start) / in drc_index_to_cpu()
153 indexes = of_get_property(dn, "ibm,drc-indexes", NULL); in drc_index_to_cpu()
158 * returned. Search through the list to find the matching in drc_index_to_cpu()
165 /* Convert core number to logical cpu number */ in drc_index_to_cpu()
179 * pseries hypervisor call H_BEST_ENERGY provides hints to OS on
180 * preferred logical cpus to activate or deactivate for optimized
188 static ssize_t get_best_energy_list(char *page, int activate) in get_best_energy_list() argument
198 return -ENOMEM; in get_best_energy_list()
201 if (activate) in get_best_energy_list()
208 return -EINVAL; in get_best_energy_list()
214 if ((cpu_online(cpu) && !activate) || in get_best_energy_list()
215 (!cpu_online(cpu) && activate)) in get_best_energy_list()
218 if (s > page) { /* Something to show */ in get_best_energy_list()
219 s--; /* Suppress last comma */ in get_best_energy_list()
224 return s-page; in get_best_energy_list()
228 char *page, int activate) in get_best_energy_data() argument
235 if (activate) in get_best_energy_data()
239 cpu_to_drc_index(dev->id), in get_best_energy_data()
243 return -EINVAL; in get_best_energy_data()
278 * Comma separated list of cpus to activate or deactivate
281 * Per-cpu value of the hint
357 sysfs_remove_file(&cpu_dev->kobj, in pseries_energy_cleanup()
359 sysfs_remove_file(&cpu_dev->kobj, in pseries_energy_cleanup()