patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / include / asm-i386 / cpu.h
1 #ifndef _ASM_I386_CPU_H_
2 #define _ASM_I386_CPU_H_
3
4 #include <linux/device.h>
5 #include <linux/cpu.h>
6 #include <linux/topology.h>
7
8 #include <asm/node.h>
9
10 struct i386_cpu {
11         struct cpu cpu;
12 };
13 extern struct i386_cpu cpu_devices[NR_CPUS];
14
15
16 static inline int arch_register_cpu(int num){
17         struct node *parent = NULL;
18         
19 #ifdef CONFIG_NUMA
20         int node = cpu_to_node(num);
21         if (node_online(node))
22                 parent = &node_devices[node].node;
23 #endif /* CONFIG_NUMA */
24
25         return register_cpu(&cpu_devices[num].cpu, num, parent);
26 }
27
28 #endif /* _ASM_I386_CPU_H_ */