summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_init.c
diff options
context:
space:
mode:
authorMichael Ellerman2006-04-07 05:56:21 +0200
committerPaul Mackerras2006-04-13 18:32:00 +0200
commit6f806ceed53776ae5e04c8b334dc9daa0932ad1e (patch)
tree9097907bc604fa69d709a9de12b467eebac0c02d /arch/powerpc/kernel/prom_init.c
parent[PATCH] ppc32: Fix string comparing in platform_notify_map (diff)
downloadkernel-qcow2-linux-6f806ceed53776ae5e04c8b334dc9daa0932ad1e.tar.gz
kernel-qcow2-linux-6f806ceed53776ae5e04c8b334dc9daa0932ad1e.tar.xz
kernel-qcow2-linux-6f806ceed53776ae5e04c8b334dc9daa0932ad1e.zip
[PATCH] powerpc: Fix machine detection in prom_init.c
In e8222502ee6157e2713da9e0792c21f4ad458d50 the detection of machine types in prom_init broke for some machines. We should be checking /device_type instead of /model. This should make Power3 and Power4 boot again. Haven't been able to test this. We also need to relocate before comparing. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r--arch/powerpc/kernel/prom_init.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index d66c5e77fcff..7e4d54821a07 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1528,12 +1528,11 @@ static int __init prom_find_machine_type(void)
* non-IBM designs !
* - it has /rtas
*/
- len = prom_getprop(_prom->root, "model",
+ len = prom_getprop(_prom->root, "device_type",
compat, sizeof(compat)-1);
if (len <= 0)
return PLATFORM_GENERIC;
- compat[len] = 0;
- if (strcmp(compat, "chrp"))
+ if (strncmp(compat, RELOC("chrp"), 4))
return PLATFORM_GENERIC;
/* Default to pSeries. We need to know if we are running LPAR */