#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/acpi.h>
#include <acpi/processor.h>
#include <linux/uaccess.h>
#include "internal.h"
#ifdef CONFIG_CPU_FREQ
#define CPUFREQ_THERMAL_MIN_STEP …
static int cpufreq_thermal_max_step __read_mostly = …;
static int cpufreq_thermal_reduction_pctg __read_mostly = …;
static DEFINE_PER_CPU(unsigned int, cpufreq_thermal_reduction_step);
#define reduction_step(cpu) …
static int phys_package_first_cpu(int cpu)
{ … }
static int cpu_has_cpufreq(unsigned int cpu)
{ … }
static int cpufreq_get_max_state(unsigned int cpu)
{ … }
static int cpufreq_get_cur_state(unsigned int cpu)
{ … }
static int cpufreq_set_cur_state(unsigned int cpu, int state)
{ … }
static void acpi_thermal_cpufreq_config(void)
{ … }
void acpi_thermal_cpufreq_init(struct cpufreq_policy *policy)
{ … }
void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy)
{ … }
#else
static int cpufreq_get_max_state(unsigned int cpu)
{
return 0;
}
static int cpufreq_get_cur_state(unsigned int cpu)
{
return 0;
}
static int cpufreq_set_cur_state(unsigned int cpu, int state)
{
return 0;
}
#endif
static int acpi_processor_max_state(struct acpi_processor *pr)
{ … }
static int
processor_get_max_state(struct thermal_cooling_device *cdev,
unsigned long *state)
{ … }
static int
processor_get_cur_state(struct thermal_cooling_device *cdev,
unsigned long *cur_state)
{ … }
static int
processor_set_cur_state(struct thermal_cooling_device *cdev,
unsigned long state)
{ … }
const struct thermal_cooling_device_ops processor_cooling_ops = …;
int acpi_processor_thermal_init(struct acpi_processor *pr,
struct acpi_device *device)
{ … }
void acpi_processor_thermal_exit(struct acpi_processor *pr,
struct acpi_device *device)
{ … }