Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754842AbZKDJFY (ORCPT ); Wed, 4 Nov 2009 04:05:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754820AbZKDJFV (ORCPT ); Wed, 4 Nov 2009 04:05:21 -0500 Received: from mail-pw0-f42.google.com ([209.85.160.42]:33321 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751012AbZKDJFR (ORCPT ); Wed, 4 Nov 2009 04:05:17 -0500 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=OHSqVRYFdLyc6X87mlEIpcx+jur6oHZxOaGJ5gZ1lFI8qnFiDt8vDd3D+5arhy7VNr RqpFOb4x7Y/2kI2KOHVPHW8AM4tINocSC7zWGAlEQXG2oA410+nnrVlGvrDnppL/9DZ4 gYS9e3AqYxDPCGlneGr7s/5T6ca9/A2qDzafg= From: Wu Zhangjin To: Ralf Baechle Cc: Wu Zhangjin , linux-mips@linux-mips.org, LKML , huhb@lemote.com, yanh@lemote.com, Zhang Le , Thomas Gleixner , Nicholas Mc Guire , zhangfx@lemote.com, liujl@lemote.com Subject: [PATCH -queue v0 2/6] [loongson] oprofile: avoid do_IRQ for perfcounter when the interrupt is from bonito Date: Wed, 4 Nov 2009 17:05:08 +0800 Message-Id: <061879e220036f930cd1cf5a6d22fca4d2be255c.1257325319.git.wuzhangjin@gmail.com> X-Mailer: git-send-email 1.6.2.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1109 Lines: 31 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 --- arch/mips/oprofile/op_model_loongson2.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/mips/oprofile/op_model_loongson2.c b/arch/mips/oprofile/op_model_loongson2.c index 575cd14..08d4b09 100644 --- a/arch/mips/oprofile/op_model_loongson2.c +++ b/arch/mips/oprofile/op_model_loongson2.c @@ -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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/