#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/cpufreq.h>
#include <linux/acpi.h>
#include <acpi/processor.h>
#include <asm/io.h>
#include <linux/uaccess.h>
static int ignore_tpc;
module_param(ignore_tpc, int, 0644);
MODULE_PARM_DESC(…) …;
struct throttling_tstate { … };
struct acpi_processor_throttling_arg { … };
#define THROTTLING_PRECHANGE …
#define THROTTLING_POSTCHANGE …
static int acpi_processor_get_throttling(struct acpi_processor *pr);
static int __acpi_processor_set_throttling(struct acpi_processor *pr,
int state, bool force, bool direct);
static int acpi_processor_update_tsd_coord(void)
{ … }
void acpi_processor_throttling_init(void)
{ … }
static int acpi_processor_throttling_notifier(unsigned long event, void *data)
{ … }
static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
{ … }
int acpi_processor_tstate_has_changed(struct acpi_processor *pr)
{ … }
void acpi_processor_reevaluate_tstate(struct acpi_processor *pr,
bool is_dead)
{ … }
static int acpi_processor_get_throttling_control(struct acpi_processor *pr)
{ … }
static int acpi_processor_get_throttling_states(struct acpi_processor *pr)
{ … }
static int acpi_processor_get_tsd(struct acpi_processor *pr)
{ … }
static int acpi_processor_get_throttling_fadt(struct acpi_processor *pr)
{ … }
#ifdef CONFIG_X86
static int acpi_throttling_rdmsr(u64 *value)
{ … }
static int acpi_throttling_wrmsr(u64 value)
{ … }
#else
static int acpi_throttling_rdmsr(u64 *value)
{
pr_err("HARDWARE addr space,NOT supported yet\n");
return -1;
}
static int acpi_throttling_wrmsr(u64 value)
{
pr_err("HARDWARE addr space,NOT supported yet\n");
return -1;
}
#endif
static int acpi_read_throttling_status(struct acpi_processor *pr,
u64 *value)
{ … }
static int acpi_write_throttling_state(struct acpi_processor *pr,
u64 value)
{ … }
static int acpi_get_throttling_state(struct acpi_processor *pr,
u64 value)
{ … }
static int acpi_get_throttling_value(struct acpi_processor *pr,
int state, u64 *value)
{ … }
static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
{ … }
static long __acpi_processor_get_throttling(void *data)
{ … }
static int acpi_processor_get_throttling(struct acpi_processor *pr)
{ … }
static int acpi_processor_get_fadt_info(struct acpi_processor *pr)
{ … }
static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr,
int state, bool force)
{ … }
static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr,
int state, bool force)
{ … }
static long acpi_processor_throttling_fn(void *data)
{ … }
static int __acpi_processor_set_throttling(struct acpi_processor *pr,
int state, bool force, bool direct)
{ … }
int acpi_processor_set_throttling(struct acpi_processor *pr, int state,
bool force)
{ … }
int acpi_processor_get_throttling_info(struct acpi_processor *pr)
{ … }