2 * drivers/base/cpu.c - basic CPU class support
5 #include <linux/sysdev.h>
6 #include <linux/module.h>
7 #include <linux/init.h>
9 #include <linux/topology.h>
12 struct sysdev_class cpu_sysdev_class
= {
18 * register_cpu - Setup a driverfs device for a CPU.
19 * @num - CPU number to use when creating the device.
21 * Initialize and register the CPU device.
23 int __init
register_cpu(struct cpu
*cpu
, int num
, struct node
*root
)
25 cpu
->node_id
= cpu_to_node(num
);
27 cpu
->sysdev
.cls
= &cpu_sysdev_class
;
28 return sys_device_register(&cpu
->sysdev
);
33 int __init
cpu_dev_init(void)
35 return sysdev_class_register(&cpu_sysdev_class
);