Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144986
b: refs/heads/master
c: e5fc948
h: refs/heads/master
v: v3
  • Loading branch information
Maynard Johnson authored and Benjamin Herrenschmidt committed May 15, 2009
1 parent c061947 commit f1c3379
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 397717c578a5e02cf76b6c99c68f50fee94b59f8
refs/heads/master: e5fc948b11a9d0aee1cabe7c82726bc36d496875
9 changes: 8 additions & 1 deletion trunk/arch/powerpc/oprofile/op_model_power4.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
static unsigned long reset_value[OP_MAX_COUNTER];

static int oprofile_running;
static int use_slot_nums;

/* mmcr values are set in power4_reg_setup, used in power4_cpu_setup */
static u32 mmcr0_val;
Expand Down Expand Up @@ -61,6 +62,12 @@ static int power4_reg_setup(struct op_counter_config *ctr,
else
mmcr0_val |= MMCR0_PROBLEM_DISABLE;

if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p) ||
__is_processor(PV_970) || __is_processor(PV_970FX) ||
__is_processor(PV_970MP) || __is_processor(PV_970GX) ||
__is_processor(PV_POWER5) || __is_processor(PV_POWER5p))
use_slot_nums = 1;

return 0;
}

Expand Down Expand Up @@ -206,7 +213,7 @@ static unsigned long get_pc(struct pt_regs *regs)

mmcra = mfspr(SPRN_MMCRA);

if (mmcra & MMCRA_SAMPLE_ENABLE) {
if (use_slot_nums && (mmcra & MMCRA_SAMPLE_ENABLE)) {
slot = ((mmcra & MMCRA_SLOT) >> MMCRA_SLOT_SHIFT);
if (slot > 1)
pc += 4 * (slot - 1);
Expand Down

0 comments on commit f1c3379

Please sign in to comment.