#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/fcntl.h>
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/smp.h>
#include <linux/major.h>
#include <linux/fs.h>
#include <linux/device.h>
#include <linux/cpu.h>
#include <linux/notifier.h>
#include <linux/uaccess.h>
#include <linux/gfp.h>
#include <linux/completion.h>
#include <asm/processor.h>
#include <asm/msr.h>
static enum cpuhp_state cpuhp_cpuid_state;
struct cpuid_regs_done { … };
static void cpuid_smp_cpuid(void *cmd_block)
{ … }
static ssize_t cpuid_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{ … }
static int cpuid_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations cpuid_fops = …;
static char *cpuid_devnode(const struct device *dev, umode_t *mode)
{ … }
static const struct class cpuid_class = …;
static int cpuid_device_create(unsigned int cpu)
{ … }
static int cpuid_device_destroy(unsigned int cpu)
{ … }
static int __init cpuid_init(void)
{ … }
module_init(…) …;
static void __exit cpuid_exit(void)
{ … }
module_exit(cpuid_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;