Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166609
b: refs/heads/master
c: 8813d33
h: refs/heads/master
i:
  166607: c8547ff
v: v3
  • Loading branch information
Uwe Kleine-König authored and Ralf Baechle committed Sep 30, 2009
1 parent cf7536a commit b36b062
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: b265158399ad825411f3d471cacc46b00d0e4841
refs/heads/master: 8813d33ee03eee04eb2a8130658d591767d9f4fe
14 changes: 7 additions & 7 deletions trunk/arch/mips/oprofile/op_model_loongson2.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static struct loongson2_register_config {
unsigned int ctrl;
unsigned long long reset_counter1;
unsigned long long reset_counter2;
int cnt1_enalbed, cnt2_enalbed;
int cnt1_enabled, cnt2_enabled;
} reg;

DEFINE_SPINLOCK(sample_lock);
Expand Down Expand Up @@ -81,8 +81,8 @@ static void loongson2_reg_setup(struct op_counter_config *cfg)

reg.ctrl = ctrl;

reg.cnt1_enalbed = cfg[0].enabled;
reg.cnt2_enalbed = cfg[1].enabled;
reg.cnt1_enabled = cfg[0].enabled;
reg.cnt2_enabled = cfg[1].enabled;

}

Expand All @@ -99,7 +99,7 @@ static void loongson2_cpu_setup(void *args)
static void loongson2_cpu_start(void *args)
{
/* Start all counters on current CPU */
if (reg.cnt1_enalbed || reg.cnt2_enalbed)
if (reg.cnt1_enabled || reg.cnt2_enabled)
write_c0_perfctrl(reg.ctrl);
}

Expand All @@ -125,7 +125,7 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
*/

/* Check whether the irq belongs to me */
enabled = reg.cnt1_enalbed | reg.cnt2_enalbed;
enabled = reg.cnt1_enabled | reg.cnt2_enabled;
if (!enabled)
return IRQ_NONE;

Expand All @@ -136,12 +136,12 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
spin_lock_irqsave(&sample_lock, flags);

if (counter1 & LOONGSON2_PERFCNT_OVERFLOW) {
if (reg.cnt1_enalbed)
if (reg.cnt1_enabled)
oprofile_add_sample(regs, 0);
counter1 = reg.reset_counter1;
}
if (counter2 & LOONGSON2_PERFCNT_OVERFLOW) {
if (reg.cnt2_enalbed)
if (reg.cnt2_enabled)
oprofile_add_sample(regs, 1);
counter2 = reg.reset_counter2;
}
Expand Down

0 comments on commit b36b062

Please sign in to comment.