From: Joe.C <srv_yingjoe.chen@mediatek.com>
To: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Boris BREZILLON <boris.brezillon@free-electrons.com>,
Russell King <linux@arm.linux.org.uk>,
yingjoe.chen@gmail.com, yh.chen@mediatek.com,
nathan.chung@mediatek.com, Grant Likely <grant.likely@linaro.org>,
devicetree@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>,
Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Marc Zyngier <marc.zyngier@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org,
srv_heupstream@mediatek.com, hc.yen@mediatek.com,
linux-kernel@vger.kernel.org,
Sascha Hauer <kernel@pengutronix.de>,
Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH] [RFC] Using hierarchy irqdomian to implement MTK intpol.
Date: Thu, 25 Sep 2014 10:16:57 +0800 [thread overview]
Message-ID: <1411611417.21763.56.camel@mtksdaap41> (raw)
In-Reply-To: <1411574696-1881-1-git-send-email-srv_yingjoe.chen@mediatek.com>
Jiang,
Please consider merge the following 2 changes into your next round.
On Thu, 2014-09-25 at 00:04 +0800, Joe.C wrote:
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index e285f3a..01e852b 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -467,7 +467,7 @@ unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data)
> struct irq_domain *domain;
> irq_hw_number_t hwirq;
> unsigned int type = IRQ_TYPE_NONE;
> - unsigned int virq;
> + int virq;
>
> domain = irq_data->np ? irq_find_host(irq_data->np) : irq_default_domain;
> if (!domain) {
> @@ -493,8 +493,8 @@ unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data)
> else
> #endif
> virq = irq_create_mapping(domain, hwirq);
> - if (!virq)
> - return virq;
> + if (virq <= 0)
> + return 0;
>
> /* Set type if specified and different than the current one */
> if (type != IRQ_TYPE_NONE &&
irq_of_parse_and_map()/of_irq_to_resource() expect
irq_create_of_mapping() to return 0 when fail. Return error code will
cause of_irq_to_resource crash.
> @@ -716,20 +716,20 @@ const struct irq_domain_ops irq_domain_simple_ops = {
> };
> EXPORT_SYMBOL_GPL(irq_domain_simple_ops);
>
> -static int irq_domain_alloc_descs(int virq, unsigned int nr_irqs,
> +static int irq_domain_alloc_descs(int virq, unsigned int cnt,
> irq_hw_number_t hwirq, int node)
> {
> unsigned int hint;
>
> if (virq >= 0) {
> - virq = irq_alloc_descs(virq, virq, nr_irqs, node);
> + virq = irq_alloc_descs(virq, virq, cnt, node);
> } else {
> hint = hwirq % nr_irqs;
> if (hint == 0)
> hint++;
> - virq = irq_alloc_descs_from(hint, nr_irqs, node);
> + virq = irq_alloc_descs_from(hint, cnt, node);
> if (virq <= 0 && hint > 1)
> - virq = irq_alloc_descs_from(1, nr_irqs, node);
> + virq = irq_alloc_descs_from(1, cnt, node);
> }
>
> return virq;
This come from irq_create_mapping(), the original code is using global
nr_irqs. Change to match original behavior.
Joe.C
next prev parent reply other threads:[~2014-09-25 2:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 16:04 [PATCH] [RFC] Using hierarchy irqdomian to implement MTK intpol Joe.C
2014-09-25 2:16 ` Joe.C [this message]
2014-09-25 3:04 ` Jiang Liu
[not found] ` <54238645.8090502-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-09-25 3:17 ` Jason Cooper
2014-09-25 3:37 ` Jiang Liu
[not found] ` <1411574696-1881-1-git-send-email-srv_yingjoe.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2014-09-25 3:12 ` Jiang Liu
2014-09-25 14:27 ` Thomas Gleixner
2014-09-25 19:20 ` Arnd Bergmann
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=1411611417.21763.56.camel@mtksdaap41 \
--to=srv_yingjoe.chen@mediatek.com \
--cc=benh@kernel.crashing.org \
--cc=boris.brezillon@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=eddie.huang@mediatek.com \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=hc.yen@mediatek.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jason@lakedaemon.net \
--cc=jiang.liu@linux.intel.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=nathan.chung@mediatek.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=srv_heupstream@mediatek.com \
--cc=tglx@linutronix.de \
--cc=yh.chen@mediatek.com \
--cc=yingjoe.chen@gmail.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