pstate_funcs
pstate_funcs.get_val(cpu, pstate));
int perf_ctl_scaling = pstate_funcs.get_scaling();
cpu->pstate.max_pstate_physical = pstate_funcs.get_max_physical(cpu->cpu);
cpu->pstate.min_pstate = pstate_funcs.get_min(cpu->cpu);
if (pstate_funcs.get_cpu_scaling) {
cpu->pstate.scaling = pstate_funcs.get_cpu_scaling(cpu->cpu);
cpu->pstate.max_pstate = pstate_funcs.get_max(cpu->cpu);
cpu->pstate.turbo_pstate = pstate_funcs.get_turbo(cpu->cpu);
if (pstate_funcs.get_aperf_mperf_shift)
cpu->aperf_mperf_shift = pstate_funcs.get_aperf_mperf_shift();
if (pstate_funcs.get_vid)
pstate_funcs.get_vid(cpu);
wrmsrq(MSR_IA32_PERF_CTL, pstate_funcs.get_val(cpu, pstate));
static struct pstate_funcs core_funcs = {
static const struct pstate_funcs silvermont_funcs = {
static const struct pstate_funcs airmont_funcs = {
static const struct pstate_funcs knl_funcs = {
static struct pstate_funcs pstate_funcs __read_mostly;
pstate_funcs.get_val(cpu, target_pstate));
pstate_funcs.get_val(cpu, target_pstate));
if (!pstate_funcs.get_max(0) ||
!pstate_funcs.get_min(0) ||
!pstate_funcs.get_turbo(0))
static void __init copy_cpu_funcs(struct pstate_funcs *funcs)
pstate_funcs.get_max = funcs->get_max;
pstate_funcs.get_max_physical = funcs->get_max_physical;
pstate_funcs.get_min = funcs->get_min;
pstate_funcs.get_turbo = funcs->get_turbo;
pstate_funcs.get_scaling = funcs->get_scaling;
pstate_funcs.get_val = funcs->get_val;
pstate_funcs.get_vid = funcs->get_vid;
pstate_funcs.get_aperf_mperf_shift = funcs->get_aperf_mperf_shift;
pstate_funcs.get_cpu_scaling = hwp_get_cpu_scaling;
copy_cpu_funcs((struct pstate_funcs *)id->driver_data);
int perf_ctl_turbo = pstate_funcs.get_turbo(cpu->cpu);