aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/oprofile/op_model_rs64.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2006-03-26 20:03:17 -0500
committerPaul Mackerras <paulus@samba.org>2006-03-28 21:44:16 -0500
commitfa465f8c7008c6cab32b05f3f1af57f7c86e8873 (patch)
treed517abb9447600283359fb181a955bcd66b9633a /arch/powerpc/oprofile/op_model_rs64.c
parent6c6bd754bf43d59756f094de144ecac239629dda (diff)
[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,
175 struct op_counter_config *ctr) 175 struct op_counter_config *ctr)
176{ 176{
177 unsigned int mmcr0; 177 unsigned int mmcr0;
178 int is_kernel;
178 int val; 179 int val;
179 int i; 180 int i;
180 unsigned long pc = mfspr(SPRN_SIAR); 181 unsigned long pc = mfspr(SPRN_SIAR);
181 182
183 is_kernel = is_kernel_addr(pc);
184
182 /* set the PMM bit (see comment below) */ 185 /* set the PMM bit (see comment below) */
183 mtmsrd(mfmsr() | MSR_PMM); 186 mtmsrd(mfmsr() | MSR_PMM);
184 187
@@ -186,7 +189,7 @@ static void rs64_handle_interrupt(struct pt_regs *regs,
186 val = ctr_read(i); 189 val = ctr_read(i);
187 if (val < 0) { 190 if (val < 0) {
188 if (ctr[i].enabled) { 191 if (ctr[i].enabled) {
189 oprofile_add_pc(pc, is_kernel_addr(pc), i); 192 oprofile_add_ext_sample(pc, regs, i, is_kernel);
190 ctr_write(i, reset_value[i]); 193 ctr_write(i, reset_value[i]);
191 } else { 194 } else {
192 ctr_write(i, 0); 195 ctr_write(i, 0);