diff options
Diffstat (limited to 'drivers/base/cpu.c')
-rw-r--r-- | drivers/base/cpu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index db87e78d745..2a0c670c281 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/node.h> | 12 | #include <linux/node.h> |
13 | #include <linux/gfp.h> | 13 | #include <linux/gfp.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/percpu.h> | 15 | #include <linux/percpu.h> |
15 | 16 | ||
16 | #include "base.h" | 17 | #include "base.h" |
@@ -223,6 +224,9 @@ int __cpuinit register_cpu(struct cpu *cpu, int num) | |||
223 | cpu->node_id = cpu_to_node(num); | 224 | cpu->node_id = cpu_to_node(num); |
224 | cpu->dev.id = num; | 225 | cpu->dev.id = num; |
225 | cpu->dev.bus = &cpu_subsys; | 226 | cpu->dev.bus = &cpu_subsys; |
227 | #ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE | ||
228 | cpu->dev.bus->uevent = arch_cpu_uevent; | ||
229 | #endif | ||
226 | error = device_register(&cpu->dev); | 230 | error = device_register(&cpu->dev); |
227 | if (!error && cpu->hotpluggable) | 231 | if (!error && cpu->hotpluggable) |
228 | register_cpu_control(cpu); | 232 | register_cpu_control(cpu); |
@@ -247,6 +251,10 @@ struct device *get_cpu_device(unsigned cpu) | |||
247 | } | 251 | } |
248 | EXPORT_SYMBOL_GPL(get_cpu_device); | 252 | EXPORT_SYMBOL_GPL(get_cpu_device); |
249 | 253 | ||
254 | #ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE | ||
255 | static DEVICE_ATTR(modalias, 0444, arch_print_cpu_modalias, NULL); | ||
256 | #endif | ||
257 | |||
250 | static struct attribute *cpu_root_attrs[] = { | 258 | static struct attribute *cpu_root_attrs[] = { |
251 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE | 259 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE |
252 | &dev_attr_probe.attr, | 260 | &dev_attr_probe.attr, |
@@ -257,6 +265,9 @@ static struct attribute *cpu_root_attrs[] = { | |||
257 | &cpu_attrs[2].attr.attr, | 265 | &cpu_attrs[2].attr.attr, |
258 | &dev_attr_kernel_max.attr, | 266 | &dev_attr_kernel_max.attr, |
259 | &dev_attr_offline.attr, | 267 | &dev_attr_offline.attr, |
268 | #ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE | ||
269 | &dev_attr_modalias.attr, | ||
270 | #endif | ||
260 | NULL | 271 | NULL |
261 | }; | 272 | }; |
262 | 273 | ||