summaryrefslogtreecommitdiff
path: root/arch/ia64/include/asm/topology.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-12-04 09:57:13 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2008-12-04 09:57:13 +1100
commitcb23fe6ad127f7fd49cabf71908385c7941e6730 (patch)
tree16c78a6c26f8b68ac5afb20ef46f7d9eb20c3ddc /arch/ia64/include/asm/topology.h
parent1189e31ca4c02d453527430a5dbf5bb78b04d8c1 (diff)
cpumask:cpumask_of_node-ia64
Impact: New APIs The old node_to_cpumask/node_to_pcibus returned a cpumask_t: these return a pointer to a struct cpumask. Part of removing cpumasks from the stack. We can also use the new for_each_cpu_and() to avoid a temporary cpumask, and a gratuitous test in sn_topology_show. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/include/asm/topology.h')
-rw-r--r--arch/ia64/include/asm/topology.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/topology.h b/arch/ia64/include/asm/topology.h
index 35bcb641c9e5..66f0f1ef9e7f 100644
--- a/arch/ia64/include/asm/topology.h
+++ b/arch/ia64/include/asm/topology.h
@@ -34,6 +34,7 @@
* Returns a bitmask of CPUs on Node 'node'.
*/
#define node_to_cpumask(node) (node_to_cpu_mask[node])
+#define cpumask_of_node(node) (&node_to_cpu_mask[node])
/*
* Returns the number of the node containing Node 'nid'.
@@ -45,7 +46,7 @@
/*
* Returns the number of the first CPU on Node 'node'.
*/
-#define node_to_first_cpu(node) (first_cpu(node_to_cpumask(node)))
+#define node_to_first_cpu(node) (cpumask_first(cpumask_of_node(node)))
/*
* Determines the node for a given pci bus
@@ -121,6 +122,10 @@ extern void arch_fix_phys_package_id(int num, u32 slot);
node_to_cpumask(pcibus_to_node(bus)) \
)
+#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
+ cpu_all_mask : \
+ cpumask_from_node(pcibus_to_node(bus)))
+
#include <asm-generic/topology.h>
#endif /* _ASM_IA64_TOPOLOGY_H */