linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@us.ibm.com>
To: Nathan Lynch <nathanl@austin.ibm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 5/7] powerpc numa: Consolidate handling of Power4 special case
Date: Mon, 20 Mar 2006 21:54:22 -0600	[thread overview]
Message-ID: <20060321035421.GA7714@us.ibm.com> (raw)
In-Reply-To: <11429013752643-git-send-email-nathanl@austin.ibm.com>

On Mon, Mar 20, 2006 at 06:36:15PM -0600, Nathan Lynch wrote:
> Code to handle Power4's invalid node id (0xffff) is duplicated for cpu
> and memory.  Better to handle this case in one place --
> of_node_to_nid.  Overall behavior should be unchanged.
> 
> Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
> 
> ---
> 
>  arch/powerpc/mm/numa.c |   23 +++++++++++------------
>  1 files changed, 11 insertions(+), 12 deletions(-)
> 
> d9dd3889e58eeb34d1130d2514fea905ca2cab6a
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index e511ca1..4a6cbb0 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -207,6 +207,11 @@ static int of_node_to_nid(struct device_
>  		    device->full_name);
>  		nid = 0;
>  	}
> +
> +	/* POWER4 LPAR uses 0xffff as invalid node */
> +	if (nid == 0xffff)

A #define for 0xffff would make the code much nicer.  Something like
POWER4_LPAR_INVALID_NODEID could also enable you to remove the above
comment.

Thanks,
Jon

> +		nid = 0;
> +
>  	return nid;
>  }
>  
> @@ -297,14 +302,9 @@ static int __cpuinit numa_setup_cpu(unsi
>  	nid = of_node_to_nid(cpu);
>  
>  	if (nid >= num_online_nodes()) {
> -		/*
> -		 * POWER4 LPAR uses 0xffff as invalid node,
> -		 * dont warn in this case.
> -		 */
> -		if (nid != 0xffff)
> -			printk(KERN_ERR "WARNING: cpu %ld "
> -			       "maps to invalid NUMA node %d\n",
> -			       lcpu, nid);
> +		printk(KERN_ERR "WARNING: cpu %ld "
> +		       "maps to invalid NUMA node %d\n",
> +		       lcpu, nid);
>  		nid = 0;
>  	}
>  out:
> @@ -442,10 +442,9 @@ new_range:
>  		nid = of_node_to_nid(memory);
>  
>  		if (nid >= MAX_NUMNODES) {
> -			if (nid != 0xffff)
> -				printk(KERN_ERR "WARNING: memory at %lx maps "
> -				       "to invalid NUMA node %d\n", start,
> -				       nid);
> +			printk(KERN_ERR "WARNING: memory at %lx maps "
> +			       "to invalid NUMA node %d\n", start,
> +			       nid);
>  			nid = 0;
>  		}
>  
> -- 
> 1.2.4
> 
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

  reply	other threads:[~2006-03-21  4:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-21  0:33 [PATCH 0/7] powerpc numa updates and fixes Nathan Lynch
2006-03-21  0:34 ` [PATCH 1/7] powerpc numa: fix boot_cpuid always assigned to node 0 Nathan Lynch
2006-03-21  0:34 ` [PATCH 2/7] powerpc numa: Minor debugging code changes Nathan Lynch
2006-03-21 18:27   ` Dave Hansen
2006-03-21 18:54     ` Nathan Lynch
2006-03-21  0:35 ` [PATCH 3/7] powerpc numa: Minor cpu hotplug-related cleanups Nathan Lynch
2006-03-21  0:35 ` [PATCH 4/7] powerpc numa: Get rid of "numa domain" terminology Nathan Lynch
2006-03-21  0:36 ` [PATCH 5/7] powerpc numa: Consolidate handling of Power4 special case Nathan Lynch
2006-03-21  3:54   ` Jon Mason [this message]
2006-03-21  0:36 ` [PATCH 6/7] powerpc numa: Support sparse online node map Nathan Lynch
2006-03-21  0:37 ` [PATCH 7/7] powerpc numa: Consolidate assignment of cpus to nodes Nathan Lynch
2006-03-21 18:38   ` Dave Hansen
2006-03-21 19:16     ` Nathan Lynch
2006-03-21 23:09       ` Michael Ellerman
2006-03-21 23:22         ` Nathan Lynch
2006-03-21 23:34           ` Michael Ellerman

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=20060321035421.GA7714@us.ibm.com \
    --to=jdmason@us.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=nathanl@austin.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).