[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    [PATCH] provide pcibus_to_cpumask from topology
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2003-02-28 23:02:35
[Download RAW message or body]

ChangeSet 1.1022.4.4, 2003/02/28 15:02:35-08:00, mbligh@aracnet.com

	[PATCH] provide pcibus_to_cpumask from topology
	
	Patch from Matthew Dobson
	
	Provide a pcibus_to_cpumask function in the topology infrastructure to
	access the pre-existing array.


# This patch includes the following deltas:
#	           ChangeSet	1.1022.4.3 -> 1.1022.4.4
#	include/asm-generic/topology.h	1.4     -> 1.5    
#	include/asm-i386/topology.h	1.5     -> 1.6    
#

 asm-generic/topology.h |    3 +++
 asm-i386/topology.h    |    8 ++++++++
 2 files changed, 11 insertions(+)


diff -Nru a/include/asm-generic/topology.h b/include/asm-generic/topology.h
--- a/include/asm-generic/topology.h	Fri Feb 28 16:07:48 2003
+++ b/include/asm-generic/topology.h	Fri Feb 28 16:07:48 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 -Nru a/include/asm-i386/topology.h b/include/asm-i386/topology.h
--- a/include/asm-i386/topology.h	Fri Feb 28 16:07:48 2003
+++ b/include/asm-i386/topology.h	Fri Feb 28 16:07:48 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 @@
 
 /* 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
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic