MCPcopy Create free account
hub / github.com/F-Stack/f-stack / intel_hwpstate_get

Function intel_hwpstate_get

freebsd/x86/cpufreq/hwpstate_intel.c:530–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530static int
531intel_hwpstate_get(device_t dev, struct cf_setting *set)
532{
533 struct pcpu *pc;
534 uint64_t rate;
535 int ret;
536
537 if (set == NULL)
538 return (EINVAL);
539
540 pc = cpu_get_pcpu(dev);
541 if (pc == NULL)
542 return (ENXIO);
543
544 memset(set, CPUFREQ_VAL_UNKNOWN, sizeof(*set));
545 set->dev = dev;
546
547 ret = cpu_est_clockrate(pc->pc_cpuid, &rate);
548 if (ret == 0)
549 set->freq = rate / 1000000;
550
551 set->volts = CPUFREQ_VAL_UNKNOWN;
552 set->power = CPUFREQ_VAL_UNKNOWN;
553 set->lat = CPUFREQ_VAL_UNKNOWN;
554
555 return (0);
556}
557
558static int
559intel_hwpstate_type(device_t dev, int *type)

Callers

nothing calls this directly

Calls 3

cpu_get_pcpuFunction · 0.85
memsetFunction · 0.85
cpu_est_clockrateFunction · 0.50

Tested by

no test coverage detected