Commit 937893cf authored by Wu Zhangjin's avatar Wu Zhangjin Committed by Ralf Baechle

MIPS: oprofile: Only do performance counter handling for counter interrupts

In Loongson2f IP6 is shared by bonito and perfcounters so we need to avoid
do_IRQ for perfcounter when the interrupt is from bonito.
Signed-off-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent a3ed4951
/* /*
* Loongson2 performance counter driver for oprofile * Loongson2 performance counter driver for oprofile
* *
* Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology * Copyright (C) 2009 Lemote Inc.
* Author: Yanhua <yanh@lemote.com> * Author: Yanhua <yanh@lemote.com>
* Author: Wu Zhangjin <wuzj@lemote.com> * Author: Wu Zhangjin <wuzj@lemote.com>
* *
...@@ -125,6 +125,9 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id) ...@@ -125,6 +125,9 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id)
*/ */
/* Check whether the irq belongs to me */ /* Check whether the irq belongs to me */
enabled = read_c0_perfcnt() & LOONGSON2_PERFCNT_INT_EN;
if (!enabled)
return IRQ_NONE;
enabled = reg.cnt1_enabled | reg.cnt2_enabled; enabled = reg.cnt1_enabled | reg.cnt2_enabled;
if (!enabled) if (!enabled)
return IRQ_NONE; return IRQ_NONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment