public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 4/7 provide pcibus_to_cpumask from topology
@ 2003-02-28 21:34 Martin J. Bligh
  0 siblings, 0 replies; only message in thread
From: Martin J. Bligh @ 2003-02-28 21:34 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, colpatch

Patch from Matthew Dobson

Just provides a pcibus_to_cpumask function in the topology infrastructure
to access the pre-existing array.


diff -urpN -X /home/fletch/.diff.exclude 012-pfn_to_nid/include/asm-generic/topology.h 013-pcibus_to_cpumask/include/asm-generic/topology.h
--- 012-pfn_to_nid/include/asm-generic/topology.h	Thu Feb 13 11:08:13 2003
+++ 013-pcibus_to_cpumask/include/asm-generic/topology.h	Fri Feb 28 08:05:35 2003
@@ -47,6 +47,9 @@
 #ifndef node_to_memblk
 #define node_to_memblk(node)	(0)
 #endif
+#ifndef pcibus_to_cpumask
+#define pcibus_to_cpumask(bus)	(cpu_online_map)
+#endif
 
 /* Cross-node load balancing interval. */
 #ifndef NODE_BALANCE_RATE
diff -urpN -X /home/fletch/.diff.exclude 012-pfn_to_nid/include/asm-i386/topology.h 013-pcibus_to_cpumask/include/asm-i386/topology.h
--- 012-pfn_to_nid/include/asm-i386/topology.h	Thu Feb 13 11:08:13 2003
+++ 013-pcibus_to_cpumask/include/asm-i386/topology.h	Fri Feb 28 08:05:35 2003
@@ -29,6 +29,8 @@
 
 #ifdef CONFIG_NUMA
 
+#include <asm/mpspec.h>
+
 /* Mappings between logical cpu number and node number */
 extern volatile unsigned long node_2_cpu_mask[];
 extern volatile int cpu_2_node[];
@@ -60,6 +62,12 @@ static inline int node_to_first_cpu(int 
 
 /* Returns the number of the first MemBlk on Node 'node' */
 #define node_to_memblk(node) (node)
+
+/* Returns the number of the node containing PCI bus 'bus' */
+static inline unsigned long pcibus_to_cpumask(int bus)
+{
+	return node_to_cpumask(mp_bus_id_to_node[bus]);
+}
 
 /* Cross-node load balancing interval. */
 #define NODE_BALANCE_RATE 100


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-28 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-28 21:34 [PATCH] 4/7 provide pcibus_to_cpumask from topology Martin J. Bligh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox