Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200828
b: refs/heads/master
c: 1d84267
h: refs/heads/master
v: v3
  • Loading branch information
Wu Zhangjin authored and Ralf Baechle committed Jul 5, 2010
1 parent c899972 commit 0207e7c
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 2e93d1ec080e4b21a34869129bda73f24ebb8950
refs/heads/master: 1d84267480ce8cf9943b79b70da86ddb3f95e3dd
8 changes: 7 additions & 1 deletion trunk/arch/mips/oprofile/op_model_loongson2.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ static struct loongson2_register_config {
static char *oprofid = "LoongsonPerf";
static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id);

static void reset_counters(void *arg)
{
write_c0_perfctrl(0);
write_c0_perfcnt(0);
}

static void loongson2_reg_setup(struct op_counter_config *cfg)
{
unsigned int ctrl = 0;
Expand Down Expand Up @@ -139,7 +145,7 @@ static int __init loongson2_init(void)

static void loongson2_exit(void)
{
write_c0_perfctrl(0);
reset_counters(NULL);
free_irq(LOONGSON2_PERFCNT_IRQ, oprofid);
}

Expand Down

0 comments on commit 0207e7c

Please sign in to comment.