diff options
-rw-r--r-- | 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 575cd1473475..475ff46712ab 100644 --- a/arch/mips/oprofile/op_model_loongson2.c +++ b/arch/mips/oprofile/op_model_loongson2.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Loongson2 performance counter driver for oprofile | 2 | * Loongson2 performance counter driver for oprofile |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Lemote Inc. & Insititute of Computing Technology | 4 | * Copyright (C) 2009 Lemote Inc. |
5 | * Author: Yanhua <yanh@lemote.com> | 5 | * Author: Yanhua <yanh@lemote.com> |
6 | * Author: Wu Zhangjin <wuzj@lemote.com> | 6 | * Author: Wu Zhangjin <wuzj@lemote.com> |
7 | * | 7 | * |
@@ -125,6 +125,9 @@ static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id) | |||
125 | */ | 125 | */ |
126 | 126 | ||
127 | /* Check whether the irq belongs to me */ | 127 | /* Check whether the irq belongs to me */ |
128 | enabled = read_c0_perfcnt() & LOONGSON2_PERFCNT_INT_EN; | ||
129 | if (!enabled) | ||
130 | return IRQ_NONE; | ||
128 | enabled = reg.cnt1_enabled | reg.cnt2_enabled; | 131 | enabled = reg.cnt1_enabled | reg.cnt2_enabled; |
129 | if (!enabled) | 132 | if (!enabled) |
130 | return IRQ_NONE; | 133 | return IRQ_NONE; |