[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120927135420.GM13568@linux-sh.org>
Date: Thu, 27 Sep 2012 22:54:21 +0900
From: Paul Mundt <lethal@...ux-sh.org>
To: Linus Walleij <linus.walleij@...ricsson.com>
Cc: <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
Stephen Warren <swarren@...dia.com>,
Anmar Oueja <anmar.oueja@...aro.org>,
Linus Walleij <linus.walleij@...aro.org>,
Rob Herring <rob.herring@...xeda.com>,
Thomas Gleixner <tglx@...utronix.de>,
Grant Likely <grant.likely@...retlab.ca>,
Russell King <linux@....linux.org.uk>,
Lee Jones <lee.jones@...aro.org>
Subject: Re: [PATCH 2/4] irqdomain: augment add_simple() to allocate descs
On Thu, Sep 27, 2012 at 03:13:45PM +0200, Linus Walleij wrote:
> + if (first_irq > 0) {
> + int irq_base;
> +
> + irq_base = irq_alloc_descs(first_irq, 0, size, numa_node_id());
> + if (irq_base < 0) {
> + WARN(1, "Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n",
> + first_irq);
> + irq_base = first_irq;
> + }
> + return irq_domain_add_legacy(of_node, size, irq_base, 0,
> ops, host_data);
If first_irq is specified you presumably want irq_alloc_desc_at()
behaviour, so you should use irq_alloc_descs(first_irq, first_irq, ...),
similar to what irq_create_strict_mappings() does.
Also don't use numa_node_id() for this, of_node_to_nid() handles both the
OF and non-OF cases.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists