]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86_64/topology.h
[PATCH] fix x86 topology export in sysfs for subarchitectures
[linux-2.6-omap-h63xx.git] / include / asm-x86_64 / topology.h
index d39ebd5263ed4ff1fdf98739c93fe1a51750d903..c642f5d9882df400e91b3f1fdf7ba3ff966c54bf 100644 (file)
@@ -23,7 +23,7 @@ extern int __node_distance(int, int);
 
 #define cpu_to_node(cpu)               (cpu_to_node[cpu])
 #define parent_node(node)              (node)
-#define node_to_first_cpu(node)        (__ffs(node_to_cpumask[node]))
+#define node_to_first_cpu(node)        (first_cpu(node_to_cpumask[node]))
 #define node_to_cpumask(node)          (node_to_cpumask[node])
 #define pcibus_to_node(bus)            ((long)(bus->sysdata))  
 #define pcibus_to_cpumask(bus)         node_to_cpumask(pcibus_to_node(bus));
@@ -39,7 +39,6 @@ extern int __node_distance(int, int);
        .max_interval           = 32,                   \
        .busy_factor            = 32,                   \
        .imbalance_pct          = 125,                  \
-       .cache_hot_time         = (10*1000000),         \
        .cache_nice_tries       = 2,                    \
        .busy_idx               = 3,                    \
        .idle_idx               = 2,                    \
@@ -58,6 +57,15 @@ extern int __node_distance(int, int);
 
 #endif
 
+#ifdef CONFIG_SMP
+#define topology_physical_package_id(cpu)                              \
+       (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu])
+#define topology_core_id(cpu)                                          \
+       (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu])
+#define topology_core_siblings(cpu)            (cpu_core_map[cpu])
+#define topology_thread_siblings(cpu)          (cpu_sibling_map[cpu])
+#endif
+
 #include <asm-generic/topology.h>
 
 #endif