From: Marc Zyngier <marc.zyngier@arm.com>
To: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 09/10] genirq/irqdomain: fall back to default domain when creating hierarchy domain
Date: Tue, 19 Feb 2019 16:27:16 +0000 [thread overview]
Message-ID: <20190219162716.04b0a54b@why.wild-wind.fr.eu.org> (raw)
In-Reply-To: <20190219155728.19163-10-tbogendoerfer@suse.de>
On Tue, 19 Feb 2019 16:57:23 +0100
Thomas Bogendoerfer <tbogendoerfer@suse.de> wrote:
Hi Thomas,
> When creating hierarchy domains use irq_default_domain as parent, if no
> parent was given by the caller. This avoids adding helper code for
> querying the underlying platform irq domain.
>
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
> ---
> kernel/irq/irqdomain.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index 8b0be4bd6565..617c482d0778 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -1021,7 +1021,10 @@ struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent,
> else
> domain = irq_domain_create_tree(fwnode, ops, host_data);
> if (domain) {
> - domain->parent = parent;
> + if (parent)
> + domain->parent = parent;
> + else
> + domain->parent = irq_default_domain;
> domain->flags |= flags;
> }
>
I'm really not keen on this. The whole "default domain" made sense at a
distant point in time (when irqdomains were new and platform code was
blissfully ignoring it), but it really looks like a sore spot in the
hierarchy code, which assumes that you always know what you're building
your hierarchy on top of.
It also create a small issue in the sense that you can create a root
domain using irq_domain_create_hierarchy() by passing NULL as the
parent. With this patch, the new domain now points to the default one,
with unexpected consequences.
So let's come back to first principles: How comes you can't obtain the
parent domain at creation time? Because I'd rather give you a way to
retrieve it instead if this.
M. (who wish he had an IP27!)
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2019-02-19 16:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 15:57 [PATCH v2 00/10] MIPS: SGI-IP27 rework Thomas Bogendoerfer
2019-02-19 15:57 ` [PATCH v2 01/10] MIPS: SGI-IP27: get rid of volatile and hubreg_t Thomas Bogendoerfer
2019-02-25 19:08 ` Paul Burton
2019-02-19 15:57 ` [PATCH v2 02/10] MIPS: SGI-IP27: clean up bridge access and header files Thomas Bogendoerfer
2019-02-25 19:08 ` Paul Burton
2019-02-19 15:57 ` [PATCH v2 03/10] MIPS: SGI-IP27: use pr_info/pr_emerg and pr_cont to fix output Thomas Bogendoerfer
2019-02-25 19:08 ` Paul Burton
2019-02-19 15:57 ` [PATCH v2 04/10] MIPS: SGI-IP27: do xtalk scanning later Thomas Bogendoerfer
2019-02-25 19:08 ` Paul Burton
2019-02-19 15:57 ` [PATCH v2 05/10] MIPS: SGI-IP27: do boot CPU init later Thomas Bogendoerfer
2019-02-25 19:08 ` Paul Burton
2019-02-19 15:57 ` [PATCH v2 06/10] MIPS: SGI-IP27: rework HUB interrupts Thomas Bogendoerfer
2019-02-25 19:08 ` Paul Burton
2019-02-19 15:57 ` [PATCH v2 07/10] PCI: call add_bus method also for root bus Thomas Bogendoerfer
2019-02-21 23:37 ` Bjorn Helgaas
2019-02-23 11:04 ` Thomas Bogendoerfer
2019-02-28 13:03 ` Thomas Bogendoerfer
2019-02-19 15:57 ` [PATCH v2 08/10] MIPS: SGI-IP27: use generic PCI driver Thomas Bogendoerfer
2019-02-22 14:46 ` Christoph Hellwig
2019-02-27 17:10 ` Thomas Bogendoerfer
2019-02-19 15:57 ` [PATCH v2 09/10] genirq/irqdomain: fall back to default domain when creating hierarchy domain Thomas Bogendoerfer
2019-02-19 16:27 ` Marc Zyngier [this message]
2019-02-19 16:48 ` Thomas Bogendoerfer
2019-02-20 9:15 ` Marc Zyngier
2019-02-20 15:00 ` Thomas Bogendoerfer
2019-02-20 15:07 ` Marc Zyngier
2019-02-19 15:57 ` [PATCH v2 10/10] MIPS: SGI-IP27: abstract chipset irq from bridge Thomas Bogendoerfer
2019-02-21 20:50 ` [PATCH v2 00/10] MIPS: SGI-IP27 rework Paul Burton
2019-02-22 8:14 ` Thomas Bogendoerfer
2019-02-22 14:49 ` Christoph Hellwig
2019-02-25 19:17 ` Paul Burton
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=20190219162716.04b0a54b@why.wild-wind.fr.eu.org \
--to=marc.zyngier@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tbogendoerfer@suse.de \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®