From: Grant Likely <grant.likely@secretlab.ca>
To: Mike Qiu <qiudayu@linux.vnet.ibm.com>, linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, benh@kernel.crashing.org,
Mike Qiu <qiudayu@linux.vnet.ibm.com>
Subject: Re: [PATCH] No need to call irq_domain_legacy_revmap() for twice
Date: Mon, 26 Nov 2012 20:17:39 +0000 [thread overview]
Message-ID: <20121126201739.13F213E09C2@localhost> (raw)
In-Reply-To: <1348479475-13074-1-git-send-email-qiudayu@linux.vnet.ibm.com>
On Mon, 24 Sep 2012 17:37:55 +0800, Mike Qiu <qiudayu@linux.vnet.ibm.com> wrote:
> Function irq_create_mapping() calls irq_find_mapping(). The later
> function has checked if the indicated IRQ domain has hw IRQ mapped to
> virtual IRQ through legacy mode or not and return the value of the
> legacy irq number by call irq_domain_legacy_revmap(). We needn't
> to call irq_domain_legacy_revmap() to do same check in
> irq_create_mapping() again.
>
> The patch removes the duplicate call.
>
> Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
> ---
> kernel/irq/irqdomain.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index 49a7772..286d672 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -547,9 +547,12 @@ unsigned int irq_create_mapping(struct irq_domain *domain,
> return virq;
> }
>
> - /* Get a virtual interrupt number */
> + /*
> + * For IRQ domain with type of IRQ_DOMAIN_MAP_LEGACY, we needn't
> + * create the IRQ mapping for non-existing one, so just return 0.
> + */
> if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
> - return irq_domain_legacy_revmap(domain, hwirq);
> + return 0;
But it does need to return the virq assigned to the hwirq. That is why
it has to call the revmap function.
g.
next prev parent reply other threads:[~2012-11-26 21:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 9:37 [PATCH] No need to call irq_domain_legacy_revmap() for twice Mike Qiu
2012-10-10 5:41 ` Mike
2012-11-26 20:17 ` Grant Likely [this message]
2012-11-27 1:41 ` Mike
2012-12-11 8:30 ` Grant Likely
2012-12-11 8:50 ` Mike
2013-04-17 6:48 ` Mike
2013-06-05 22:46 ` Grant Likely
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=20121126201739.13F213E09C2@localhost \
--to=grant.likely@secretlab.ca \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qiudayu@linux.vnet.ibm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.