From fa465f8c7008c6cab32b05f3f1af57f7c86e8873 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Mon, 27 Mar 2006 12:03:17 +1100 Subject: [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 Signed-off-by: Paul Mackerras --- arch/powerpc/oprofile/op_model_rs64.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/oprofile/op_model_rs64.c') 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); -- cgit v1.2.3