From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xenproject.org
Cc: stefano.stabellini@citrix.com,
Julien Grall <julien.grall@linaro.org>,
tim@xen.org, ian.campbell@citrix.com
Subject: [PATCH v3 2/2] xen/dt: Allow only IRQ translation that are mapped to main GIC
Date: Wed, 9 Jul 2014 14:23:43 +0100 [thread overview]
Message-ID: <1404912223-9320-2-git-send-email-julien.grall@linaro.org> (raw)
In-Reply-To: <1404912223-9320-1-git-send-email-julien.grall@linaro.org>
Xen is only able to handle one GIC controller. Some platform may contain
other interrupt controller.
Make sure to only translate IRQ mapped into the GIC handled by Xen.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
Changes in v3:
- Add an ASSERT to check that dt_interrupt_controller is not
NULL.
Changes in v2:
- Fix compilation...
---
xen/common/device_tree.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 310635e..cc45bd1 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -1442,9 +1442,12 @@ int dt_irq_translate(const struct dt_raw_irq *raw,
struct dt_irq *out_irq)
{
ASSERT(dt_irq_xlate != NULL);
+ ASSERT(dt_interrupt_controller != NULL);
- /* TODO: Retrieve the right irq_xlate. This is only work for the gic */
+ if ( raw->controller != dt_interrupt_controller )
+ return -EINVAL;
+ /* TODO: Retrieve the right irq_xlate. This is only work for the gic */
return dt_irq_xlate(raw->specifier, raw->size,
&out_irq->irq, &out_irq->type);
}
--
1.7.10.4
next prev parent reply other threads:[~2014-07-09 13:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 13:23 [PATCH v3 1/2] xen/arm: Divide GIC initialization in 2 parts Julien Grall
2014-07-09 13:23 ` Julien Grall [this message]
2014-07-16 13:14 ` [PATCH v3 2/2] xen/dt: Allow only IRQ translation that are mapped to main GIC Ian Campbell
2014-07-16 14:28 ` Julien Grall
2014-07-16 14:34 ` Ian Campbell
2014-07-16 14:36 ` Julien Grall
2014-07-16 13:10 ` [PATCH v3 1/2] xen/arm: Divide GIC initialization in 2 parts Ian Campbell
2014-07-16 14:22 ` Julien Grall
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=1404912223-9320-2-git-send-email-julien.grall@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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).