linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lethal@linux-sh.org (Paul Mundt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] irqdomain: augment add_simple() to allocate descs
Date: Thu, 27 Sep 2012 22:54:21 +0900	[thread overview]
Message-ID: <20120927135420.GM13568@linux-sh.org> (raw)
In-Reply-To: <1348751625-17420-1-git-send-email-linus.walleij@stericsson.com>

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.

      parent reply	other threads:[~2012-09-27 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 13:13 [PATCH 2/4] irqdomain: augment add_simple() to allocate descs Linus Walleij
2012-09-27 13:41 ` Rob Herring
2012-11-26 20:22   ` Grant Likely
2012-09-27 13:54 ` Paul Mundt [this message]

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=20120927135420.GM13568@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).