From: "tip-bot2 for Alan Mikhak" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Alan Mikhak <alan.mikhak@sifive.com>,
Marc Zyngier <maz@kernel.org>, Christoph Hellwig <hch@lst.de>,
Paul Walmsley <paul.walmsley@sifive.com>,
Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
linux-kernel@vger.kernel.org
Subject: [tip: irq/urgent] irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
Date: Fri, 25 Oct 2019 12:30:14 -0000 [thread overview]
Message-ID: <157200661432.29376.6464692458150883535.tip-bot2@tip-bot2> (raw)
In-Reply-To: <1571933503-21504-1-git-send-email-alan.mikhak@sifive.com>
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 41860cc447045c811ce6d5a92f93a065a691fe8e
Gitweb: https://git.kernel.org/tip/41860cc447045c811ce6d5a92f93a065a691fe8e
Author: Alan Mikhak <alan.mikhak@sifive.com>
AuthorDate: Thu, 24 Oct 2019 09:11:43 -07:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Fri, 25 Oct 2019 11:48:13 +01:00
irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
Modify plic_init() to skip .dts interrupt contexts other
than supervisor external interrupt.
The .dts entry for plic may specify multiple interrupt contexts.
For example, it may assign two entries IRQ_M_EXT and IRQ_S_EXT,
in that order, to the same interrupt controller. This patch
modifies plic_init() to skip the IRQ_M_EXT context since
IRQ_S_EXT is currently the only supported context.
If IRQ_M_EXT is not skipped, plic_init() will report "handler
already present for context" when it comes across the IRQ_S_EXT
context in the next iteration of its loop.
Without this patch, .dts would have to be edited to replace the
value of IRQ_M_EXT with -1 for it to be skipped.
Signed-off-by: Alan Mikhak <alan.mikhak@sifive.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Paul Walmsley <paul.walmsley@sifive.com> # arch/riscv
Link: https://lkml.kernel.org/r/1571933503-21504-1-git-send-email-alan.mikhak@sifive.com
---
drivers/irqchip/irq-sifive-plic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c
index 3e51dee..b1a33f9 100644
--- a/drivers/irqchip/irq-sifive-plic.c
+++ b/drivers/irqchip/irq-sifive-plic.c
@@ -251,8 +251,8 @@ static int __init plic_init(struct device_node *node,
continue;
}
- /* skip context holes */
- if (parent.args[0] == -1)
+ /* skip contexts other than supervisor external interrupt */
+ if (parent.args[0] != IRQ_S_EXT)
continue;
hartid = plic_find_hart_id(parent.np);
prev parent reply other threads:[~2019-10-25 12:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 16:11 [PATCH v2] irqchip: Skip contexts except supervisor in plic_init() Alan Mikhak
2019-10-25 12:30 ` tip-bot2 for Alan Mikhak [this message]
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=157200661432.29376.6464692458150883535.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=alan.mikhak@sifive.com \
--cc=bp@alien8.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mingo@kernel.org \
--cc=paul.walmsley@sifive.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).