All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Michael Neuling <mikey@neuling.org>
Subject: Re: [PATCH] Fix pSeries identification in prom_init.c
Date: Mon, 15 May 2006 15:51:22 +1000	[thread overview]
Message-ID: <1147672282.21291.92.camel@localhost.localdomain> (raw)
In-Reply-To: <1147671963.21291.91.camel@localhost.localdomain>

On Mon, 2006-05-15 at 15:46 +1000, Benjamin Herrenschmidt wrote:
> The OF trampoline code prom_init.c still needs to identify IBM pSeries
> (PAPR) machines in order to run some platform specific code on them like
> instanciating the TCE tables. The code doing that detection was changed
> recently in 2.6.17 early stages but was done slightly incorrectly. It
> should be testing for an exact match of "chrp" and it currently tests
> for anything that begins with "chrp". That means it will incorrectly
> match with platforms using Maple-like device-trees and have open
> firmware. This fixes it by using strcmp instead of strncmp to match what
> the actual platform detection code does.

Michael, I noticed you changed strcmp to strncmp, any reason why you did
that ?

> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> 
> Paul, if you are happy with that, please send upsteam ASAP.
> 
> Index: linux-work/arch/powerpc/kernel/prom_init.c
> ===================================================================
> --- linux-work.orig/arch/powerpc/kernel/prom_init.c	2006-05-02 10:51:33.000000000 +1000
> +++ linux-work/arch/powerpc/kernel/prom_init.c	2006-05-15 15:37:03.000000000 +1000
> @@ -1636,7 +1636,7 @@
>  			   compat, sizeof(compat)-1);
>  	if (len <= 0)
>  		return PLATFORM_GENERIC;
> -	if (strncmp(compat, RELOC("chrp"), 4))
> +	if (strcmp(compat, RELOC("chrp")))
>  		return PLATFORM_GENERIC;
>  
>  	/* Default to pSeries. We need to know if we are running LPAR */
> 

  reply	other threads:[~2006-05-15  5:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-15  5:46 [PATCH] Fix pSeries identification in prom_init.c Benjamin Herrenschmidt
2006-05-15  5:51 ` Benjamin Herrenschmidt [this message]
2006-05-15 16:17   ` Michael Neuling
2006-05-15 21:08     ` Benjamin Herrenschmidt
2006-05-15  9:51 ` segher

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=1147672282.21291.92.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=paulus@samba.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.