/* * intel_pstate.c: Native P state management for Intel processors * * (C) Copyright 2012 Intel Corporation * Author: Dirk Brandewie <dirk.j.brandewie@intel.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. */#include<linux/kernel.h>#include<linux/kernel_stat.h>#include<linux/module.h>#include<linux/ktime.h>#include<linux/hrtimer.h>#include<linux/tick.h>#include<linux/slab.h>#include<linux/sched.h>#include<linux/list.h>#include<linux/cpu.h>#include<linux/cpufreq.h>#include<linux/sysfs.h>#include<linux/types.h>#include<linux/fs.h>#include<linux/debugfs.h>#include<linux/acpi.h>#include<linux/vmalloc.h>#include<trace/events/power.h>#include<asm/div64.h>#include<asm/msr.h>#include<asm/cpu_device_id.h>#include<asm/cpufeature.h>#define ATOM_RATIOS 0x66a#define ATOM_VIDS 0x66b#define ATOM_TURBO_RATIOS 0x66c#define ATOM_TURBO_VIDS 0x66d#define FRAC_BITS 8#define int_tofp(X) ((int64_t)(X) << FRAC_BITS)#define fp_toint(X) ((X) >> FRAC_BITS)staticinlineint32_tmul_fp(int32_tx,int32_ty){return((int64_t)x*(int64_t)y)>>FRAC_BITS;}staticinlineint32_tdiv_fp(s64x,s64y){returndiv64_s64((int64_t)