diff options
author | Arnd Bergmann <arnd@arndb.de> | 2006-11-27 13:18:57 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 04:41:16 -0500 |
commit | e22ba7e38144c1cccac5024cfd6ec88bb64d3e1f (patch) | |
tree | 869b43ec4fcc66b0ff6bb6eb7f735b1846859b8c /arch/powerpc/platforms/ps3/mm.c | |
parent | eb30c72026500f9efa9bb23ab2393d6a9e36c5e1 (diff) |
[POWERPC] ps3: multiplatform build fixes
A few code paths need to check whether or not they are running
on the PS3's LV1 hypervisor before making hcalls. This introduces
a new firmware feature bit for this, FW_FEATURE_PS3_LV1.
Now when both PS3 and IBM_CELL_BLADE are enabled, but not PSERIES,
FW_FEATURE_PS3_LV1 and FW_FEATURE_LPAR get enabled at compile time,
which is a bug. The same problem can also happen for (PPC_ISERIES &&
!PPC_PSERIES && PPC_SOMETHING_ELSE). In order to solve this, I
introduce a new CONFIG_PPC_NATIVE option that is set when at least
one platform is selected that can run without a hypervisor and then
turns the firmware feature check into a run-time option.
The new cell oprofile support that was recently merged does not
work on hypervisor based platforms like the PS3, therefore make
it depend on PPC_CELL_NATIVE instead of PPC_CELL. This may change
if we get oprofile support for PS3.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms/ps3/mm.c')
-rw-r--r-- | arch/powerpc/platforms/ps3/mm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index a57f7036dd1f..49c0d010d491 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/memory_hotplug.h> | 23 | #include <linux/memory_hotplug.h> |
24 | 24 | ||
25 | #include <asm/firmware.h> | ||
25 | #include <asm/lmb.h> | 26 | #include <asm/lmb.h> |
26 | #include <asm/udbg.h> | 27 | #include <asm/udbg.h> |
27 | #include <asm/ps3.h> | 28 | #include <asm/ps3.h> |
@@ -293,6 +294,9 @@ static int __init ps3_mm_add_memory(void) | |||
293 | unsigned long start_pfn; | 294 | unsigned long start_pfn; |
294 | unsigned long nr_pages; | 295 | unsigned long nr_pages; |
295 | 296 | ||
297 | if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) | ||
298 | return 0; | ||
299 | |||
296 | BUG_ON(!mem_init_done); | 300 | BUG_ON(!mem_init_done); |
297 | 301 | ||
298 | start_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size; | 302 | start_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size; |