提交 f1d39e6e 编写于 作者: R Ralf Baechle

MIPS: Loongson: Remove pointless sample_lock from oprofile code.

Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 36946d73
...@@ -47,8 +47,6 @@ static struct loongson2_register_config { ...@@ -47,8 +47,6 @@ static struct loongson2_register_config {
int cnt1_enabled, cnt2_enabled; int cnt1_enabled, cnt2_enabled;
} reg; } reg;
static DEFINE_SPINLOCK(sample_lock);
static char *oprofid = "LoongsonPerf"; static char *oprofid = "LoongsonPerf";
static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id); static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id);
/* Compute all of the registers in preparation for enabling profiling. */ /* Compute all of the registers in preparation for enabling profiling. */
...@@ -115,7 +113,6 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id) ...@@ -115,7 +113,6 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
uint64_t counter, counter1, counter2; uint64_t counter, counter1, counter2;
struct pt_regs *regs = get_irq_regs(); struct pt_regs *regs = get_irq_regs();
int enabled; int enabled;
unsigned long flags;
/* /*
* LOONGSON2 defines two 32-bit performance counters. * LOONGSON2 defines two 32-bit performance counters.
...@@ -136,8 +133,6 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id) ...@@ -136,8 +133,6 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
counter1 = counter & 0xffffffff; counter1 = counter & 0xffffffff;
counter2 = counter >> 32; counter2 = counter >> 32;
spin_lock_irqsave(&sample_lock, flags);
if (counter1 & LOONGSON2_PERFCNT_OVERFLOW) { if (counter1 & LOONGSON2_PERFCNT_OVERFLOW) {
if (reg.cnt1_enabled) if (reg.cnt1_enabled)
oprofile_add_sample(regs, 0); oprofile_add_sample(regs, 0);
...@@ -149,8 +144,6 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id) ...@@ -149,8 +144,6 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
counter2 = reg.reset_counter2; counter2 = reg.reset_counter2;
} }
spin_unlock_irqrestore(&sample_lock, flags);
write_c0_perfcnt((counter2 << 32) | counter1); write_c0_perfcnt((counter2 << 32) | counter1);
return IRQ_HANDLED; return IRQ_HANDLED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册