aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/sysfs.c')
-rw-r--r--arch/sparc64/kernel/sysfs.c26
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 00000000000..0808c214dc7
--- /dev/null
+++ b/arch/sparc64/kernel/sysfs.c
@@ -0,0 +1,26 @@
+/* sysfs.c: Toplogy sysfs support code for sparc64.
+ *
+ * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
+ */
+#include <linux/sysdev.h>
+#include <linux/cpu.h>
+#include <linux/smp.h>
+#include <linux/percpu.h>
+#include <linux/init.h>
+
+static DEFINE_PER_CPU(struct cpu, cpu_devices);
+
+static int __init topology_init(void)
+{
+ int cpu;
+
+ for_each_possible_cpu(cpu) {
+ struct cpu *c = &per_cpu(cpu_devices, cpu);
+
+ register_cpu(c, cpu);
+ }
+
+ return 0;
+}
+
+subsys_initcall(topology_init);