]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-ia64/topology.h
[PATCH] lpfc 8.1.3: Remove unused MBhostaddr from lpfc_sli structure
[linux-2.6-omap-h63xx.git] / include / asm-ia64 / topology.h
index a9f738bf18a7e739325a4221269128fa0857ba2b..3ee19dfa46dfde66f5723030f5a0e3a9e114bca6 100644 (file)
 #include <asm/smp.h>
 
 #ifdef CONFIG_NUMA
+
+/* Nodes w/o CPUs are preferred for memory allocations, see build_zonelists */
+#define PENALTY_FOR_NODE_WITH_CPUS 255
+
 /*
  * Returns the number of the node containing CPU 'cpu'
  */
@@ -38,7 +42,7 @@
 /*
  * Returns the number of the first CPU on 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)))
 
 /*
  * Determines the node for a given pci bus
@@ -55,7 +59,6 @@ void build_cpu_to_node_map(void);
        .max_interval           = 4,                    \
        .busy_factor            = 64,                   \
        .imbalance_pct          = 125,                  \
-       .cache_hot_time         = (10*1000000),         \
        .per_cpu_gain           = 100,                  \
        .cache_nice_tries       = 2,                    \
        .busy_idx               = 2,                    \
@@ -81,7 +84,6 @@ void build_cpu_to_node_map(void);
        .max_interval           = 8*(min(num_online_cpus(), 32)), \
        .busy_factor            = 64,                   \
        .imbalance_pct          = 125,                  \
-       .cache_hot_time         = (10*1000000),         \
        .cache_nice_tries       = 2,                    \
        .busy_idx               = 3,                    \
        .idle_idx               = 2,                    \
@@ -100,6 +102,13 @@ void build_cpu_to_node_map(void);
 
 #endif /* CONFIG_NUMA */
 
+#ifdef CONFIG_SMP
+#define topology_physical_package_id(cpu)      (cpu_data(cpu)->socket_id)
+#define topology_core_id(cpu)                  (cpu_data(cpu)->core_id)
+#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 /* _ASM_IA64_TOPOLOGY_H */