[PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
[linux-2.6.git] / arch / powerpc / oprofile / op_model_power4.c
index 659a021da0c7b35ab9005c57dd981fce81f04996..4b06e53eb9b4bb0d4b7c521cc2fa0fdd97abb62b 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/oprofile.h>
 #include <linux/init.h>
 #include <linux/smp.h>
+#include <asm/firmware.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
 #include <asm/processor.h>
@@ -232,7 +233,7 @@ static unsigned long get_pc(struct pt_regs *regs)
        mmcra = mfspr(SPRN_MMCRA);
 
        /* Were we in the hypervisor? */
-       if (platform_is_lpar() && (mmcra & MMCRA_SIHV))
+       if (firmware_has_feature(FW_FEATURE_LPAR) && (mmcra & MMCRA_SIHV))
                /* function descriptor madness */
                return *((unsigned long *)hypervisor_bucket);