From: haojian.zhuang@linaro.org (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 04/14] irq: gic: use mask field in GICC_IAR
Date: Mon, 28 Apr 2014 14:53:42 +0800 [thread overview]
Message-ID: <1398668032-8335-5-git-send-email-haojian.zhuang@linaro.org> (raw)
In-Reply-To: <1398668032-8335-1-git-send-email-haojian.zhuang@linaro.org>
Bit[9:0] is interrupt ID field in GICC_IAR. Bit[12:10] is CPU ID field,
and others are reserved.
So we should use GICC_IAR_INTID to get interrupt ID. It's not a good way
to use ~0x1c00 (CPU ID field) to get interrupt ID.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
---
drivers/irqchip/irq-gic.c | 2 +-
include/linux/irqchip/arm-gic.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 4300b66..8fd27bf 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -287,7 +287,7 @@ static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
do {
irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK);
- irqnr = irqstat & ~0x1c00;
+ irqnr = irqstat & GICC_IAR_INTID;
if (likely(irqnr > 15 && irqnr < 1021)) {
irqnr = irq_find_mapping(gic->domain, irqnr);
diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h
index 7ed92d0..55933aa 100644
--- a/include/linux/irqchip/arm-gic.h
+++ b/include/linux/irqchip/arm-gic.h
@@ -21,6 +21,8 @@
#define GIC_CPU_ACTIVEPRIO 0xd0
#define GIC_CPU_IDENT 0xfc
+#define GICC_IAR_INTID 0x3ff
+
#define GIC_DIST_CTRL 0x000
#define GIC_DIST_CTR 0x004
#define GIC_DIST_IGROUP 0x080
--
1.9.1
next prev parent reply other threads:[~2014-04-28 6:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 6:53 [PATCH v4 00/14] enable HiP04 SoC Haojian Zhuang
2014-04-28 6:53 ` [PATCH v4 01/14] ARM: debug: add HiP04 debug uart Haojian Zhuang
2014-04-28 6:53 ` [PATCH v4 02/14] ARM: append ARCH_MULTI_V7_LPAE Haojian Zhuang
2014-04-30 6:34 ` Fwd: " Rob Herring
2014-04-28 6:53 ` [PATCH v4 03/14] ARM: config: append lpae configuration Haojian Zhuang
2014-04-28 6:53 ` Haojian Zhuang [this message]
2014-04-28 11:58 ` [PATCH v4 04/14] irq: gic: use mask field in GICC_IAR Marc Zyngier
2014-04-28 6:53 ` [PATCH v4 05/14] irq: gic: support hip04 gic Haojian Zhuang
2014-04-28 10:25 ` Marc Zyngier
2014-04-30 6:18 ` Rob Herring
2014-04-28 6:53 ` [PATCH v4 06/14] ARM: mcpm: support 4 clusters Haojian Zhuang
2014-04-29 10:21 ` Dave Martin
2014-04-28 6:53 ` [PATCH v4 07/14] ARM: hisi: add ARCH_HISI Haojian Zhuang
2014-04-28 6:53 ` [PATCH v4 08/14] ARM: hisi: add hip04 SoC support Haojian Zhuang
2014-04-29 17:05 ` Dave Martin
2014-04-28 6:53 ` [PATCH v4 09/14] ARM: dts: add hip04-d01 dts file Haojian Zhuang
2014-04-28 17:13 ` Mark Rutland
2014-04-29 11:12 ` Dave Martin
2014-04-30 6:51 ` Rob Herring
2014-04-28 6:53 ` [PATCH v4 10/14] ARM: config: append hip04_defconfig Haojian Zhuang
2014-04-28 6:53 ` [PATCH v4 11/14] ARM: config: select ARCH_HISI in hi3xxx_defconfig Haojian Zhuang
2014-04-28 6:53 ` [PATCH v4 12/14] ARM: hisi: enable erratum 798181 of A15 on HiP04 Haojian Zhuang
2014-04-28 6:53 ` [PATCH v4 13/14] ARM: dts: Add PMU support in HiP04 Haojian Zhuang
2014-04-28 6:53 ` [PATCH v4 14/14] virt: arm: support hip04 gic Haojian Zhuang
2014-04-28 10:41 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1398668032-8335-5-git-send-email-haojian.zhuang@linaro.org \
--to=haojian.zhuang@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).