lkml.org 
[lkml]   [2003]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 4/7 provide pcibus_to_cpumask from topology
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.025 / U:21.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site