diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-03-21 04:45:59 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-21 23:04:17 -0500 |
commit | 57cfb814f698d30894bc28e22125550193ebe549 (patch) | |
tree | 755fd11b1a528f8de7913119b457f866734cb81a /arch/powerpc/oprofile | |
parent | 3d15910bfbeb02286ce4b5009c53754e88066ccb (diff) |
[PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
It has been decreed that platform numbers are evil, so as a step in that
direction, replace platform_is_lpar() with a FW_FEATURE_LPAR bit.
Currently FW_FEATURE_LPAR really means i/pSeries LPAR, in the future we might
have to clean that up if we need to be more specific about what LPAR actually
means. But that's another patch ...
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/oprofile')
-rw-r--r-- | arch/powerpc/oprofile/op_model_power4.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c index 659a021da0c7..4b06e53eb9b4 100644 --- a/arch/powerpc/oprofile/op_model_power4.c +++ b/arch/powerpc/oprofile/op_model_power4.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/oprofile.h> | 10 | #include <linux/oprofile.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
13 | #include <asm/firmware.h> | ||
13 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
14 | #include <asm/system.h> | 15 | #include <asm/system.h> |
15 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
@@ -232,7 +233,7 @@ static unsigned long get_pc(struct pt_regs *regs) | |||
232 | mmcra = mfspr(SPRN_MMCRA); | 233 | mmcra = mfspr(SPRN_MMCRA); |
233 | 234 | ||
234 | /* Were we in the hypervisor? */ | 235 | /* Were we in the hypervisor? */ |
235 | if (platform_is_lpar() && (mmcra & MMCRA_SIHV)) | 236 | if (firmware_has_feature(FW_FEATURE_LPAR) && (mmcra & MMCRA_SIHV)) |
236 | /* function descriptor madness */ | 237 | /* function descriptor madness */ |
237 | return *((unsigned long *)hypervisor_bucket); | 238 | return *((unsigned long *)hypervisor_bucket); |
238 | 239 | ||