Lines Matching +full:current +full:- +full:limit

1 // SPDX-License-Identifier: GPL-2.0-only
61 return -ENOMEM; in eps_acpi_init()
63 if (!zalloc_cpumask_var(&eps_acpi_cpu_perf->shared_cpu_map, in eps_acpi_init()
67 return -ENOMEM; in eps_acpi_init()
71 free_cpumask_var(eps_acpi_cpu_perf->shared_cpu_map); in eps_acpi_init()
74 return -EIO; in eps_acpi_init()
83 free_cpumask_var(eps_acpi_cpu_perf->shared_cpu_map); in eps_acpi_exit()
102 /* Return current frequency */ in eps_get()
104 return centaur->fsb * ((lo >> 8) & 0xff); in eps_get()
122 return -ENODEV; in eps_set_state()
134 return -ENODEV; in eps_set_state()
145 pr_info("Current voltage = %dmV\n", current_voltage * 16 + 700); in eps_set_state()
147 pr_info("Current multiplier = %d\n", current_multiplier); in eps_set_state()
156 unsigned int cpu = policy->cpu; in eps_target()
161 return -ENODEV; in eps_target()
165 dest_state = centaur->freq_table[index].driver_data & 0xffff; in eps_target()
188 unsigned int limit; in eps_cpu_init() local
191 if (policy->cpu != 0) in eps_cpu_init()
192 return -ENODEV; in eps_cpu_init()
197 switch (c->x86_model) { in eps_cpu_init()
212 pr_cont("C7-M\n"); in eps_cpu_init()
221 pr_cont("C7-D\n"); in eps_cpu_init()
225 return -ENODEV; in eps_cpu_init()
236 return -ENODEV; in eps_cpu_init()
243 pr_info("Current voltage = %dmV\n", current_voltage * 16 + 700); in eps_cpu_init()
245 pr_info("Current multiplier = %d\n", current_multiplier); in eps_cpu_init()
260 return -EINVAL; in eps_cpu_init()
263 return -EINVAL; in eps_cpu_init()
265 return -EINVAL; in eps_cpu_init()
269 return -EINVAL; in eps_cpu_init()
275 return -EINVAL; in eps_cpu_init()
280 return -EINVAL; in eps_cpu_init()
287 /* Check for ACPI processor speed limit */ in eps_cpu_init()
289 if (!acpi_processor_get_bios_limit(policy->cpu, &limit)) { in eps_cpu_init()
290 pr_info("ACPI limit %u.%uGHz\n", in eps_cpu_init()
291 limit/1000000, in eps_cpu_init()
292 (limit%1000000)/10000); in eps_cpu_init()
295 if (limit && max_multiplier * fsb > limit) { in eps_cpu_init()
297 return -EINVAL; in eps_cpu_init()
309 v = (set_max_voltage - 700) / 16; in eps_cpu_init()
317 /* Calc number of p-states supported */ in eps_cpu_init()
319 states = max_multiplier - min_multiplier + 1; in eps_cpu_init()
323 /* Allocate private data and frequency table for current cpu */ in eps_cpu_init()
327 return -ENOMEM; in eps_cpu_init()
331 centaur->fsb = fsb; in eps_cpu_init()
333 centaur->bios_limit = limit; in eps_cpu_init()
337 f_table = &centaur->freq_table[0]; in eps_cpu_init()
346 step = ((max_voltage - min_voltage) * 256) in eps_cpu_init()
347 / (max_multiplier - min_multiplier); in eps_cpu_init()
357 policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */ in eps_cpu_init()
358 policy->freq_table = &centaur->freq_table[0]; in eps_cpu_init()
365 unsigned int cpu = policy->cpu; in eps_cpu_exit()
395 return -ENODEV; in eps_init()
397 return -EINVAL; in eps_init()
409 MODULE_PARM_DESC(freq_failsafe_off, "Disable current vs max frequency check");
411 MODULE_PARM_DESC(voltage_failsafe_off, "Disable current vs max voltage check");
414 MODULE_PARM_DESC(ignore_acpi_limit, "Don't check ACPI's processor speed limit");
417 MODULE_PARM_DESC(set_max_voltage, "Set maximum CPU voltage (mV) C7-M only");