#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/list.h>
#include <linux/types.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/log2.h>
#include <linux/bitmap.h>
#include <linux/delay.h>
#include <linux/sysfs.h>
#include <linux/cpu.h>
#include <linux/powercap.h>
#include <linux/suspend.h>
#include <linux/intel_rapl.h>
#include <linux/processor.h>
#include <linux/platform_device.h>
#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#define MSR_PLATFORM_POWER_LIMIT …
#define MSR_VR_CURRENT_CONFIG …
static struct rapl_if_priv *rapl_msr_priv;
static struct rapl_if_priv rapl_msr_priv_intel = …;
static struct rapl_if_priv rapl_msr_priv_amd = …;
static int rapl_cpu_online(unsigned int cpu)
{ … }
static int rapl_cpu_down_prep(unsigned int cpu)
{ … }
static int rapl_msr_read_raw(int cpu, struct reg_action *ra)
{ … }
static void rapl_msr_update_func(void *info)
{ … }
static int rapl_msr_write_raw(int cpu, struct reg_action *ra)
{ … }
static const struct x86_cpu_id pl4_support_ids[] = …;
static int rapl_msr_probe(struct platform_device *pdev)
{ … }
static void rapl_msr_remove(struct platform_device *pdev)
{ … }
static const struct platform_device_id rapl_msr_ids[] = …;
MODULE_DEVICE_TABLE(platform, rapl_msr_ids);
static struct platform_driver intel_rapl_msr_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;