This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / ia64 / dig / topology.c
1 /*
2  * arch/ia64/dig/topology.c
3  *      Popuate driverfs with topology information.
4  *      Derived entirely from i386/mach-default.c
5  *  Intel Corporation - Ashok Raj
6  */
7 #include <linux/init.h>
8 #include <linux/smp.h>
9 #include <linux/cpumask.h>
10 #include <linux/percpu.h>
11 #include <linux/notifier.h>
12 #include <linux/cpu.h>
13 #include <asm/cpu.h>
14
15 static DEFINE_PER_CPU(struct ia64_cpu, cpu_devices);
16
17 /*
18  * First Pass: simply borrowed code for now. Later should hook into
19  * hotplug notification for node/cpu/memory as applicable
20  */
21
22 static int arch_register_cpu(int num)
23 {
24         struct node *parent = NULL;
25
26 #ifdef CONFIG_NUMA
27         //parent = &node_devices[cpu_to_node(num)].node;
28 #endif
29
30         return register_cpu(&per_cpu(cpu_devices,num).cpu, num, parent);
31 }
32
33 static int __init topology_init(void)
34 {
35     int i;
36
37     for_each_cpu(i) {
38         arch_register_cpu(i);
39         }
40     return 0;
41 }
42
43 subsys_initcall(topology_init);