summaryrefslogtreecommitdiff
path: root/arch/powerpc/oprofile/op_model_rs64.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-03-27 05:03:17 +0400
committerPaul Mackerras <paulus@samba.org>2006-03-29 06:44:16 +0400
commitfa465f8c7008c6cab32b05f3f1af57f7c86e8873 (patch)
treed517abb9447600283359fb181a955bcd66b9633a /arch/powerpc/oprofile/op_model_rs64.c
parent6c6bd754bf43d59756f094de144ecac239629dda (diff)
downloadlinux-fa465f8c7008c6cab32b05f3f1af57f7c86e8873.tar.xz
[PATCH] powerpc: Add oprofile calltrace support to all powerpc cpus
Add calltrace support for other powerpc cpus. Tested on 7450. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/oprofile/op_model_rs64.c')
-rw-r--r--arch/powerpc/oprofile/op_model_rs64.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/oprofile/op_model_rs64.c b/arch/powerpc/oprofile/op_model_rs64.c
index 5c909ee609fe..042f8f4867ad 100644
--- a/arch/powerpc/oprofile/op_model_rs64.c
+++ b/arch/powerpc/oprofile/op_model_rs64.c
@@ -175,10 +175,13 @@ static void rs64_handle_interrupt(struct pt_regs *regs,
struct op_counter_config *ctr)
{
unsigned int mmcr0;
+ int is_kernel;
int val;
int i;
unsigned long pc = mfspr(SPRN_SIAR);
+ is_kernel = is_kernel_addr(pc);
+
/* set the PMM bit (see comment below) */
mtmsrd(mfmsr() | MSR_PMM);
@@ -186,7 +189,7 @@ static void rs64_handle_interrupt(struct pt_regs *regs,
val = ctr_read(i);
if (val < 0) {
if (ctr[i].enabled) {
- oprofile_add_pc(pc, is_kernel_addr(pc), i);
+ oprofile_add_ext_sample(pc, regs, i, is_kernel);
ctr_write(i, reset_value[i]);
} else {
ctr_write(i, 0);