Skip to content

Commit

Permalink
[PATCH] powerpc: Fix cell blade detection
Browse files Browse the repository at this point in the history
The IBM Cell blade firmware might confuse the kernel to think it's a
pSeries machine. This fixes it for now. With a bit of luck, the firmware
will be updated to avoid that in the future but currently that patch is
needed.

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
  • Loading branch information
arndb authored and paulusmack committed Jun 9, 2006
1 parent 33b7497 commit 133dda1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
9 changes: 9 additions & 0 deletions arch/powerpc/kernel/prom_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,15 @@ static int __init prom_find_machine_type(void)
if (strstr(p, RELOC("Power Macintosh")) ||
strstr(p, RELOC("MacRISC")))
return PLATFORM_POWERMAC;
#ifdef CONFIG_PPC64
/* We must make sure we don't detect the IBM Cell
* blades as pSeries due to some firmware issues,
* so we do it here.
*/
if (strstr(p, RELOC("IBM,CBEA")) ||
strstr(p, RELOC("IBM,CPBW-1.0")))
return PLATFORM_GENERIC;
#endif /* CONFIG_PPC64 */
i += sl + 1;
}
}
Expand Down
11 changes: 5 additions & 6 deletions arch/powerpc/platforms/cell/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,13 @@ static void __init cell_init_early(void)

static int __init cell_probe(void)
{
/* XXX This is temporary, the Cell maintainer will come up with
* more appropriate detection logic
*/
unsigned long root = of_get_flat_dt_root();
if (!of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
return 0;

return 1;
if (of_flat_dt_is_compatible(root, "IBM,CBEA") ||
of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
return 1;

return 0;
}

/*
Expand Down
8 changes: 8 additions & 0 deletions arch/powerpc/platforms/pseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,21 @@ static int __init pSeries_probe_hypertas(unsigned long node,

static int __init pSeries_probe(void)
{
unsigned long root = of_get_flat_dt_root();
char *dtype = of_get_flat_dt_prop(of_get_flat_dt_root(),
"device_type", NULL);
if (dtype == NULL)
return 0;
if (strcmp(dtype, "chrp"))
return 0;

/* Cell blades firmware claims to be chrp while it's not. Until this
* is fixed, we need to avoid those here.
*/
if (of_flat_dt_is_compatible(root, "IBM,CPBW-1.0") ||
of_flat_dt_is_compatible(root, "IBM,CBEA"))
return 0;

DBG("pSeries detected, looking for LPAR capability...\n");

/* Now try to figure out if we are running on LPAR */
Expand Down

0 comments on commit 133dda1

Please sign in to comment.