diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:53:39 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:53:39 -0500 |
commit | f1d39e6ed7ad71048db3b2835dccf3a5a01fab69 (patch) | |
tree | 9210d1ee2b97635e46dc355f9a22b03b9eb7aaf2 | |
parent | 36946d7387ee6f3a331563a1d839240924b65798 (diff) |
MIPS: Loongson: Remove pointless sample_lock from oprofile code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/oprofile/op_model_loongson2.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/mips/oprofile/op_model_loongson2.c b/arch/mips/oprofile/op_model_loongson2.c index f7f9a32c722a..29e2326b6257 100644 --- a/arch/mips/oprofile/op_model_loongson2.c +++ b/arch/mips/oprofile/op_model_loongson2.c | |||
@@ -47,8 +47,6 @@ static struct loongson2_register_config { | |||
47 | int cnt1_enabled, cnt2_enabled; | 47 | int cnt1_enabled, cnt2_enabled; |
48 | } reg; | 48 | } reg; |
49 | 49 | ||
50 | static DEFINE_SPINLOCK(sample_lock); | ||
51 | |||
52 | static char *oprofid = "LoongsonPerf"; | 50 | static char *oprofid = "LoongsonPerf"; |
53 | static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id); | 51 | static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id); |
54 | /* Compute all of the registers in preparation for enabling profiling. */ | 52 | /* 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 | uint64_t counter, counter1, counter2; | 113 | uint64_t counter, counter1, counter2; |
116 | struct pt_regs *regs = get_irq_regs(); | 114 | struct pt_regs *regs = get_irq_regs(); |
117 | int enabled; | 115 | int enabled; |
118 | unsigned long flags; | ||
119 | 116 | ||
120 | /* | 117 | /* |
121 | * LOONGSON2 defines two 32-bit performance counters. | 118 | * LOONGSON2 defines two 32-bit performance counters. |
@@ -136,8 +133,6 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id) | |||
136 | counter1 = counter & 0xffffffff; | 133 | counter1 = counter & 0xffffffff; |
137 | counter2 = counter >> 32; | 134 | counter2 = counter >> 32; |
138 | 135 | ||
139 | spin_lock_irqsave(&sample_lock, flags); | ||
140 | |||
141 | if (counter1 & LOONGSON2_PERFCNT_OVERFLOW) { | 136 | if (counter1 & LOONGSON2_PERFCNT_OVERFLOW) { |
142 | if (reg.cnt1_enabled) | 137 | if (reg.cnt1_enabled) |
143 | oprofile_add_sample(regs, 0); | 138 | oprofile_add_sample(regs, 0); |
@@ -149,8 +144,6 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id) | |||
149 | counter2 = reg.reset_counter2; | 144 | counter2 = reg.reset_counter2; |
150 | } | 145 | } |
151 | 146 | ||
152 | spin_unlock_irqrestore(&sample_lock, flags); | ||
153 | |||
154 | write_c0_perfcnt((counter2 << 32) | counter1); | 147 | write_c0_perfcnt((counter2 << 32) | counter1); |
155 | 148 | ||
156 | return IRQ_HANDLED; | 149 | return IRQ_HANDLED; |