[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>
This commit is contained in:
Arnd Bergmann
2006-11-27 19:18:57 +01:00
کامیت شده توسط Paul Mackerras
والد eb30c72026
کامیت e22ba7e381
8فایلهای تغییر یافته به همراه44 افزوده شده و 11 حذف شده

مشاهده پرونده

@@ -27,6 +27,7 @@
#include <asm/udbg.h>
#include <asm/ps3.h>
#include <asm/lv1call.h>
#include <asm/firmware.h>
#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__)
static void _dump_mmio_region(const struct ps3_mmio_region* r,
@@ -167,6 +168,9 @@ int __init ps3_system_bus_init(void)
{
int result;
if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
return 0;
result = bus_register(&ps3_system_bus_type);
BUG_ON(result);
return result;