From: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
To: Sebastian Andrzej Siewior
<bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Andres Salomon <dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>
Subject: Re: [RFC PATCH] irq: add irq_domain translation infrastructure
Date: Mon, 27 Jun 2011 19:24:19 +1000 [thread overview]
Message-ID: <1309166659.32158.380.camel@pasglop> (raw)
In-Reply-To: <20110627090059.GA31287-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
On Mon, 2011-06-27 at 11:00 +0200, Sebastian Andrzej Siewior wrote:
> * Grant Likely | 2011-05-26 00:54:38 [-0600]:
>
> >diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
> >index 39645b6..9891cd4 100644
> >--- a/arch/x86/kernel/devicetree.c
> >+++ b/arch/x86/kernel/devicetree.c
> >@@ -371,36 +321,49 @@ static struct of_ioapic_type of_ioapic_type[] =
> > },
> > };
> >
> >-static int ioapic_xlate(struct irq_domain *id, const u32 *intspec, u32 intsize,
> >- u32 *out_hwirq, u32 *out_type)
> >+static int ioapic_dt_translate(struct irq_domain *domain,
> >+ struct device_node *controller,
> >+ const u32 *intspec, u32 intsize,
> >+ irq_hw_number_t *out_hwirq, u32 *out_type)
> > {
> >- struct mp_ioapic_gsi *gsi_cfg;
> > struct io_apic_irq_attr attr;
> > struct of_ioapic_type *it;
> > u32 line, idx, type;
> >+ int rc;
> >
> >- if (intsize < 2)
> >+ if (controller != domain->of_node)
> > return -EINVAL;
>
> Is there a reason not havining the (controller != domain->of_node) check
> in irq_create_of_mapping()?
Not all domains are associated with a single OF node.
Take xics, where there can be quite a few "source controllers" which act
as device-tree interrupt parents but there's a single global domain.
Cheers,
Ben.
next prev parent reply other threads:[~2011-06-27 9:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 6:54 [RFC PATCH] irq: add irq_domain translation infrastructure Grant Likely
2011-06-27 9:00 ` Sebastian Andrzej Siewior
[not found] ` <20110627090059.GA31287-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-06-27 9:24 ` Benjamin Herrenschmidt [this message]
2011-06-27 9:57 ` Sebastian Andrzej Siewior
[not found] ` <4E08541A.4060302-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-06-27 10:14 ` Benjamin Herrenschmidt
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=1309166659.32158.380.camel@pasglop \
--to=benh-xvmvhmargas8u2djnn8i7kb+6bgklq7r@public.gmane.org \
--cc=bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.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).