| To: | Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Subject: | [PATCH -queue 2/2] [loongson] oprofile: avoid do_IRQ for perfcounter when the interrupt is from bonito |
| From: | Wu Zhangjin <wuzhangjin@gmail.com> |
| Date: | Fri, 6 Nov 2009 18:45:06 +0800 |
| Cc: | linux-mips@linux-mips.org, Wu Zhangjin <wuzhangjin@gmail.com> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references:in-reply-to:references; bh=IEwX585/EAHLeOBM95S9WJE3D3EYWQG5SFOm5HDumj8=; b=wT5uxuTX3kfjdxYFiJg4o1r9Gv7DxYVpk4SIupgNDdpJY5X+uv9Y2URtZpPJoHL0iq 7N36mMU5mWYkSMig2UPQ91MWkvKvGTW5bKo6FzIB5fD97BwTc+cwVQdfYIf+im+V95vx 4OHVSs+i/0RednGxaDN2ti3eNckKjWHXpBbFQ= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=HwHfRR6K9OhSZ3YPlRv2cqgDv8xVtYXdVV0ltBGrPVXGeteALVhJitri3Y2zdL+sJc OzpEXVYTcG2NKS/RwP4sCuvOdRybBcMmy77c+2Ni7aE0wLBtGOlN3AXDyo1JGaYfwsU5 2QcDnMckaAyauUKDdps9Cpo5flZcJZmTCzQCk= |
| In-reply-to: | <e1f93f565f4cdf3385f890f1b3a633aca03c2194.1257504242.git.wuzhangjin@gmail.com> |
| In-reply-to: | <cover.1257504242.git.wuzhangjin@gmail.com> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <cover.1257504140.git.wuzhangjin@gmail.com> <e1f93f565f4cdf3385f890f1b3a633aca03c2194.1257504242.git.wuzhangjin@gmail.com> |
| References: | <cover.1257504242.git.wuzhangjin@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
In loongson2f, the IP6 is shared by bonito and perfcounter, we need to
avoid do_IRQ for perfcounter when the interrupt is from bonito. This
patch does it.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
arch/mips/oprofile/op_model_loongson2.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/mips/oprofile/op_model_loongson2.c
b/arch/mips/oprofile/op_model_loongson2.c
index 575cd14..475ff46 100644
--- a/arch/mips/oprofile/op_model_loongson2.c
+++ b/arch/mips/oprofile/op_model_loongson2.c
@@ -1,7 +1,7 @@
/*
* 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: Wu Zhangjin <wuzj@lemote.com>
*
@@ -125,6 +125,9 @@ 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;
+ if (!enabled)
+ return IRQ_NONE;
enabled = reg.cnt1_enabled | reg.cnt2_enabled;
if (!enabled)
return IRQ_NONE;
--
1.6.2.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH -queue 1/2] [loongson] add basic loongson-2f support, Wu Zhangjin |
|---|---|
| Next by Date: | [PATCH v2] i2c-designware updates, Shinya Kuribayashi |
| Previous by Thread: | [PATCH -queue 1/2] [loongson] add basic loongson-2f support, Wu Zhangjin |
| Next by Thread: | Re: [PATCH -queue 2/2] [loongson] oprofile: avoid do_IRQ for perfcounter when the interrupt is from bonito, Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |