lkml.org 
[lkml]   [2012]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] No need to call irq_domain_legacy_revmap() for twice
    Date
    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.



    \
     
     \ /
      Last update: 2012-11-26 23:21    [W:2.917 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site