All of lore.kernel.org
 help / color / mirror / Atom feed
From: colin ngam <cngam@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [RFC] pcibus_to_node implementation for ia64
Date: Tue, 10 May 2005 23:56:01 +0000	[thread overview]
Message-ID: <42814A11.3000809@sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0505051707220.6114@schroedinger.engr.sgi.com>

Christoph Lameter wrote:

Hi Christoph,

I do not have visibility to how these get used - my apology.  However, I 
do have some comments for your perusal:

..... SNIP .....

>+int sn_pcibus_to_node(struct pci_bus *bus)
>+{
>+	return nasid_to_cnodeid(NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base));
>  
>
The cnodeid returned by the above function can be a node id:
    1.  With memory but no cpus - Headless Nodes.
    2.  With no memory and no cpus - IO Nodes.

>+}
>+EXPORT_SYMBOL(sn_pcibus_to_node);
>+
>+/*
>  * sn_alloc_pci_sysdata() - This routine allocates a pci controller
>  *	which is expected as the pci_dev and pci_bus sysdata by the Linux
>  *	PCI infrastructure.
>Index: linux-2.6.11/include/asm-ia64/topology.h
>=================================>--- linux-2.6.11.orig/include/asm-ia64/topology.h	2005-05-05 11:01:46.000000000 -0700
>+++ linux-2.6.11/include/asm-ia64/topology.h	2005-05-05 16:55:00.000000000 -0700
>@@ -29,6 +29,15 @@
> #define node_to_cpumask(node) (node_to_cpu_mask[node])
>
> /*
>+ * Returns the cpus local to a given PCI device.
>+ * pcibus_to_node is defined in asm/pci.h
>+ */
>+#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) = -1 ? \
>+					CPU_MASK_ALL : \
>+					node_to_cpumask(pcibus_to_node(bus)) \
>+				)
>  
>
pcibus_to_cpumask() can return 0 if the node is an ionode - TIO or 
Headless Node(node with no CPUs but has memory).

... SNIP ...

Thanks.

colin

  reply	other threads:[~2005-05-10 23:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-06  0:12 [RFC] pcibus_to_node implementation for ia64 Christoph Lameter
2005-05-10 23:56 ` colin ngam [this message]
2005-05-11  1:34 ` Christoph Lameter
2005-05-11  2:42 ` colin ngam
2005-05-11  6:51 ` Christoph Lameter
2005-05-11 15:29 ` Jesse Barnes
2005-05-11 15:44 ` colin ngam
2005-05-11 15:49 ` Christoph Lameter
2005-05-11 15:52 ` colin ngam
2005-05-11 15:54 ` Jesse Barnes
2005-05-11 15:58 ` Jesse Barnes
2005-05-11 16:05 ` colin ngam
2005-05-11 16:19 ` Jack Steiner

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=42814A11.3000809@sgi.com \
    --to=cngam@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /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.