#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/cpumask.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <asm/msr.h>
#include <asm/cpu_device_id.h>
#include <linux/acpi.h>
#include <linux/mutex.h>
#include <acpi/processor.h>
#define VERSION …
#include "powernow-k8.h"
static DEFINE_MUTEX(fidvid_mutex);
static DEFINE_PER_CPU(struct powernow_k8_data *, powernow_data);
static struct cpufreq_driver cpufreq_amd64_driver;
static u32 find_freq_from_fid(u32 fid)
{ … }
static u32 find_khz_freq_from_fid(u32 fid)
{ … }
static u32 convert_fid_to_vco_fid(u32 fid)
{ … }
static int pending_bit_stuck(void)
{ … }
static int query_current_values_with_pending_wait(struct powernow_k8_data *data)
{ … }
static void count_off_irt(struct powernow_k8_data *data)
{ … }
static void count_off_vst(struct powernow_k8_data *data)
{ … }
static void fidvid_msr_init(void)
{ … }
static int write_new_fid(struct powernow_k8_data *data, u32 fid)
{ … }
static int write_new_vid(struct powernow_k8_data *data, u32 vid)
{ … }
static int decrease_vid_code_by_step(struct powernow_k8_data *data,
u32 reqvid, u32 step)
{ … }
static int transition_fid_vid(struct powernow_k8_data *data,
u32 reqfid, u32 reqvid)
{ … }
static int core_voltage_pre_transition(struct powernow_k8_data *data,
u32 reqvid, u32 reqfid)
{ … }
static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid)
{ … }
static int core_voltage_post_transition(struct powernow_k8_data *data,
u32 reqvid)
{ … }
static const struct x86_cpu_id powernow_k8_ids[] = …;
MODULE_DEVICE_TABLE(x86cpu, powernow_k8_ids);
static void check_supported_cpu(void *_rc)
{ … }
static int check_pst_table(struct powernow_k8_data *data, struct pst_s *pst,
u8 maxvid)
{ … }
static void invalidate_entry(struct cpufreq_frequency_table *powernow_table,
unsigned int entry)
{ … }
static void print_basics(struct powernow_k8_data *data)
{ … }
static int fill_powernow_table(struct powernow_k8_data *data,
struct pst_s *pst, u8 maxvid)
{ … }
static int find_psb_table(struct powernow_k8_data *data)
{ … }
static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data,
unsigned int index)
{ … }
static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
{ … }
static int fill_powernow_table_fidvid(struct powernow_k8_data *data,
struct cpufreq_frequency_table *powernow_table)
{ … }
static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data)
{ … }
static int get_transition_latency(struct powernow_k8_data *data)
{ … }
static int transition_frequency_fidvid(struct powernow_k8_data *data,
unsigned int index,
struct cpufreq_policy *policy)
{ … }
struct powernowk8_target_arg { … };
static long powernowk8_target_fn(void *arg)
{ … }
static int powernowk8_target(struct cpufreq_policy *pol, unsigned index)
{ … }
struct init_on_cpu { … };
static void powernowk8_cpu_init_on_cpu(void *_init_on_cpu)
{ … }
#define MISSING_PSS_MSG …
static int powernowk8_cpu_init(struct cpufreq_policy *pol)
{ … }
static void powernowk8_cpu_exit(struct cpufreq_policy *pol)
{ … }
static void query_values_on_cpu(void *_err)
{ … }
static unsigned int powernowk8_get(unsigned int cpu)
{ … }
static struct cpufreq_driver cpufreq_amd64_driver = …;
static void __request_acpi_cpufreq(void)
{ … }
static int powernowk8_init(void)
{ … }
static void __exit powernowk8_exit(void)
{ … }
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
late_initcall(powernowk8_init);
module_exit(powernowk8_exit);