From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, colpatch@us.ibm.com
Subject: [PATCH] 4/7 provide pcibus_to_cpumask from topology
Date: Fri, 28 Feb 2003 13:34:03 -0800 [thread overview]
Message-ID: <361360000.1046468043@flay> (raw)
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
reply other threads:[~2003-02-28 21:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=361360000.1046468043@flay \
--to=mbligh@aracnet.com \
--cc=colpatch@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.