linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
To: linux-snps-arc@lists.infradead.org
Cc: Vineet.Gupta1@synopsys.com, Alexey.Brodkin@synopsys.com,
	linux-kernel@vger.kernel.org, marc.zyngier@arm.com,
	Yuriy Kolerov <yuriy.kolerov@synopsys.com>
Subject: [PATCH v3 2/3] ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP
Date: Wed, 28 Dec 2016 11:46:25 +0300	[thread overview]
Message-ID: <1482914786-10490-3-git-send-email-yuriy.kolerov@synopsys.com> (raw)
In-Reply-To: <1482914786-10490-1-git-send-email-yuriy.kolerov@synopsys.com>

It is necessary to call entry/exit functions for parent interrupt
controllers for proper masking/unmasking of interrupt lines.

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
---
 arch/arc/kernel/mcip.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arc/kernel/mcip.c b/arch/arc/kernel/mcip.c
index f39142a..be131b2 100644
--- a/arch/arc/kernel/mcip.c
+++ b/arch/arc/kernel/mcip.c
@@ -10,6 +10,7 @@
 
 #include <linux/smp.h>
 #include <linux/irq.h>
+#include <linux/irqchip/chained_irq.h>
 #include <linux/spinlock.h>
 #include <asm/irqflags-arcv2.h>
 #include <asm/mcip.h>
@@ -221,10 +222,13 @@ static irq_hw_number_t idu_first_hwirq;
 static void idu_cascade_isr(struct irq_desc *desc)
 {
 	struct irq_domain *idu_domain = irq_desc_get_handler_data(desc);
+	struct irq_chip *core_chip = irq_desc_get_chip(desc);
 	irq_hw_number_t core_hwirq = irqd_to_hwirq(irq_desc_get_irq_data(desc));
 	irq_hw_number_t idu_hwirq = core_hwirq - idu_first_hwirq;
 
+	chained_irq_enter(core_chip, desc);
 	generic_handle_irq(irq_find_mapping(idu_domain, idu_hwirq));
+	chained_irq_exit(core_chip, desc);
 }
 
 static int idu_irq_map(struct irq_domain *d, unsigned int virq, irq_hw_number_t hwirq)
-- 
2.7.4

  parent reply	other threads:[~2016-12-28  8:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28  8:46 [PATCH v3 0/3] Fixes for IRQ subsystem Yuriy Kolerov
2016-12-28  8:46 ` [PATCH v3 1/3] ARC: IRQ: Use hwirq instead of virq in mask/unmask Yuriy Kolerov
2017-01-03 18:20   ` Vineet Gupta
2016-12-28  8:46 ` Yuriy Kolerov [this message]
2017-01-03 18:21   ` [PATCH v3 2/3] ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP Vineet Gupta
2016-12-28  8:46 ` [PATCH v3 3/3] ARCv2: MCIP: Deprecate setting of affinity in Device Tree Yuriy Kolerov
2017-01-03 18:10   ` Vineet Gupta
2017-01-23 12:21     ` Yuriy Kolerov

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=1482914786-10490-3-git-send-email-yuriy.kolerov@synopsys.com \
    --to=yuriy.kolerov@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    /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).