* [PATCH] Oprofile: Loongson: Fixup of irq handler
@ 2010-05-06 16:59 Wu Zhangjin
2010-05-09 1:35 ` Wu Zhangjin
2010-05-11 10:00 ` Ralf Baechle
0 siblings, 2 replies; 3+ messages in thread
From: Wu Zhangjin @ 2010-05-06 16:59 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Wu Zhangjin
The interrupt enable bit of performance counters of Loongson is in the
control register($24), not in the counter register, so, in
loongson2_perfcount_handler(), we need to use
enabled = read_c0_perfctrl() & LOONGSON2_PERFCNT_INT_EN;
instead of
enabled = read_c0_perfcnt() & LOONGSON2_PERFCNT_INT_EN;
Reported-by: Xu Hengyang <hengyang@mail.ustc.edu.cn>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
arch/mips/oprofile/op_model_loongson2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/oprofile/op_model_loongson2.c b/arch/mips/oprofile/op_model_loongson2.c
index 29e2326..fa3bf66 100644
--- a/arch/mips/oprofile/op_model_loongson2.c
+++ b/arch/mips/oprofile/op_model_loongson2.c
@@ -122,7 +122,7 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
*/
/* Check whether the irq belongs to me */
- enabled = read_c0_perfcnt() & LOONGSON2_PERFCNT_INT_EN;
+ enabled = read_c0_perfctrl() & LOONGSON2_PERFCNT_INT_EN;
if (!enabled)
return IRQ_NONE;
enabled = reg.cnt1_enabled | reg.cnt2_enabled;
--
1.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Oprofile: Loongson: Fixup of irq handler
2010-05-06 16:59 [PATCH] Oprofile: Loongson: Fixup of irq handler Wu Zhangjin
@ 2010-05-09 1:35 ` Wu Zhangjin
2010-05-11 10:00 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: Wu Zhangjin @ 2010-05-09 1:35 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
Hi, Ralf
This one is urgent, could you please review it, thanks ;)
Regards,
Wu Zhangjin
On Fri, 2010-05-07 at 00:59 +0800, Wu Zhangjin wrote:
> The interrupt enable bit of performance counters of Loongson is in the
> control register($24), not in the counter register, so, in
> loongson2_perfcount_handler(), we need to use
>
> enabled = read_c0_perfctrl() & LOONGSON2_PERFCNT_INT_EN;
>
> instead of
>
> enabled = read_c0_perfcnt() & LOONGSON2_PERFCNT_INT_EN;
>
> Reported-by: Xu Hengyang <hengyang@mail.ustc.edu.cn>
> Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
> ---
> arch/mips/oprofile/op_model_loongson2.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/oprofile/op_model_loongson2.c b/arch/mips/oprofile/op_model_loongson2.c
> index 29e2326..fa3bf66 100644
> --- a/arch/mips/oprofile/op_model_loongson2.c
> +++ b/arch/mips/oprofile/op_model_loongson2.c
> @@ -122,7 +122,7 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
> */
>
> /* Check whether the irq belongs to me */
> - enabled = read_c0_perfcnt() & LOONGSON2_PERFCNT_INT_EN;
> + enabled = read_c0_perfctrl() & LOONGSON2_PERFCNT_INT_EN;
> if (!enabled)
> return IRQ_NONE;
> enabled = reg.cnt1_enabled | reg.cnt2_enabled;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Oprofile: Loongson: Fixup of irq handler
2010-05-06 16:59 [PATCH] Oprofile: Loongson: Fixup of irq handler Wu Zhangjin
2010-05-09 1:35 ` Wu Zhangjin
@ 2010-05-11 10:00 ` Ralf Baechle
1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2010-05-11 10:00 UTC (permalink / raw)
To: Wu Zhangjin; +Cc: linux-mips
Thanks Wu, applied!
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-11 10:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 16:59 [PATCH] Oprofile: Loongson: Fixup of irq handler Wu Zhangjin
2010-05-09 1:35 ` Wu Zhangjin
2010-05-11 10:00 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.