diff options
Diffstat (limited to 'arch/sparc64/kernel/sysfs.c')
-rw-r--r-- | arch/sparc64/kernel/sysfs.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/sysfs.c b/arch/sparc64/kernel/sysfs.c new file mode 100644 index 000000000000..0808c214dc73 --- /dev/null +++ b/arch/sparc64/kernel/sysfs.c | |||
@@ -0,0 +1,26 @@ | |||
1 | /* sysfs.c: Toplogy sysfs support code for sparc64. | ||
2 | * | ||
3 | * Copyright (C) 2007 David S. Miller <davem@davemloft.net> | ||
4 | */ | ||
5 | #include <linux/sysdev.h> | ||
6 | #include <linux/cpu.h> | ||
7 | #include <linux/smp.h> | ||
8 | #include <linux/percpu.h> | ||
9 | #include <linux/init.h> | ||
10 | |||
11 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | ||
12 | |||
13 | static int __init topology_init(void) | ||
14 | { | ||
15 | int cpu; | ||
16 | |||
17 | for_each_possible_cpu(cpu) { | ||
18 | struct cpu *c = &per_cpu(cpu_devices, cpu); | ||
19 | |||
20 | register_cpu(c, cpu); | ||
21 | } | ||
22 | |||
23 | return 0; | ||
24 | } | ||
25 | |||
26 | subsys_initcall(topology_init); | ||