summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-05-15 15:46:03 +1000
committerPaul Mackerras <paulus@samba.org>2006-05-16 21:31:25 +1000
commitcb6b2eb9bcf2f61e84dc0b55ef7e3d4923842313 (patch)
tree71d42f762163a309e804193efd3f0674c3e57dbb /arch
parent3de620e8394406fd01f450b8c6e3e74464e81a78 (diff)
downloadblackbird-op-linux-cb6b2eb9bcf2f61e84dc0b55ef7e3d4923842313.tar.gz
blackbird-op-linux-cb6b2eb9bcf2f61e84dc0b55ef7e3d4923842313.zip
[PATCH] Fix pSeries identification in prom_init.c
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. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/prom_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 078fb5533541..2d80653aa2af 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1636,7 +1636,7 @@ static int __init prom_find_machine_type(void)
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 */
OpenPOWER on IntegriCloud