Lines Matching +full:wakeup +full:- +full:latency +full:- +full:us

1 // SPDX-License-Identifier: GPL-2.0-only
10 * - We cli/sti on stepping A0 CPUs around the FID/VID transition.
12 * CPU with half frequency multipliers may hang upon wakeup from disconnect.
13 * - We disable half multipliers if ACPI is used on A0 stepping CPUs.
38 #include "powernow-k7.h"
82 150, 225, 160, 165, 170, 180, -1, -1,
95 static unsigned int minimum_speed = -1;
99 static unsigned int latency;
107 delta = (fsbspeed > f) ? fsbspeed - f : f - fsbspeed;
134 if ((c->x86_model == 6) && (c->x86_stepping == 0)) {
180 return -ENOMEM;
224 fidvidctl.bits.SGTC = latency;
239 fidvidctl.bits.SGTC = latency;
303 retval = -EINVAL;
309 retval = -ENOMEM;
313 if (!zalloc_cpumask_var(&acpi_processor_perf->shared_cpu_map,
315 retval = -ENOMEM;
320 retval = -EIO;
324 if (acpi_processor_perf->control_register.space_id !=
326 retval = -ENODEV;
330 if (acpi_processor_perf->status_register.space_id !=
332 retval = -ENODEV;
336 number_scales = acpi_processor_perf->state_count;
339 retval = -ENODEV;
346 retval = -ENOMEM;
350 pc.val = (unsigned long) acpi_processor_perf->states[0].control;
354 &acpi_processor_perf->states[i];
357 pc.val = (unsigned long) state->control;
358 pr_debug("acpi: P%d: %d MHz %d mW %d uS control %08x SGTC %d\n",
360 (u32) state->core_frequency,
361 (u32) state->power,
362 (u32) state->transition_latency,
363 (u32) state->control,
377 * get a KHz value (e.g. 1266000). However, powernow-k7 works
398 if (state->core_frequency != speed_mhz) {
399 state->core_frequency = speed_mhz;
404 if (latency < pc.bits.sgtc)
405 latency = pc.bits.sgtc;
424 free_cpumask_var(acpi_processor_perf->shared_cpu_map);
435 pr_info("no support for ACPI processor found - please recompile your kernel with ACPI processor\n");
436 return -EINVAL;
444 pst->cpuid, pst->fsbspeed, pst->maxfid, pst->startvid);
465 pr_debug("Table version: 0x%x\n", psb->tableversion);
466 if (psb->tableversion != 0x12) {
468 return -ENODEV;
471 pr_debug("Flags: 0x%x\n", psb->flags);
472 if ((psb->flags & 1) == 0)
477 latency = psb->settlingtime;
478 if (latency < 100) {
480 latency);
481 latency = 100;
484 psb->settlingtime);
487 psb->numpst);
493 for (j = 0; j < psb->numpst; j++) {
495 number_scales = pst->numpstates;
497 if ((etuple == pst->cpuid) &&
498 check_fsb(pst->fsbspeed) &&
499 (maxfid == pst->maxfid) &&
500 (startvid == pst->startvid)) {
516 return -EINVAL;
521 return -ENODEV;
531 * the "well-known" other OS.
544 sgtc = 100 * m * latency;
570 d->ident);
598 if (policy->cpu != 0)
599 return -ENODEV;
608 return -EINVAL;
613 pr_info("PSB/PST known to be broken - trying ACPI instead\n");
621 minimum_speed = -1;
622 latency = 0;
629 latency = fixup_sgtc();
630 pr_info("SGTC: %d\n", latency);
637 pr_info("Minimum speed %d MHz - Maximum speed %d MHz\n",
640 policy->cpuinfo.transition_latency =
641 cpufreq_scale(2000000UL, fsb, latency);
642 policy->freq_table = powernow_table;
652 free_cpumask_var(acpi_processor_perf->shared_cpu_map);
669 .name = "powernow-k7",
675 return -ENODEV;