From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] irqchip: vic: update the base IRQ member correctly
Date: Wed, 22 Jan 2014 14:31:07 +0100 [thread overview]
Message-ID: <1390397471-6802-2-git-send-email-linus.walleij@linaro.org> (raw)
In-Reply-To: <1390397471-6802-1-git-send-email-linus.walleij@linaro.org>
When passing 0 as the irq base the VIC driver will dynamically
allocate a number of consecutive interrupt descriptors at some
available number range. Make sure this number is recorded in
the state container rather than the passed-in zero argument
in this case.
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
tglx: if you're happy with this pls ACK it so I can take this
through the ARM SoC tree.
---
drivers/irqchip/irq-vic.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-vic.c b/drivers/irqchip/irq-vic.c
index 8e21ae0bab46..70108c1491bc 100644
--- a/drivers/irqchip/irq-vic.c
+++ b/drivers/irqchip/irq-vic.c
@@ -273,7 +273,6 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
v->base = base;
v->valid_sources = valid_sources;
v->resume_sources = resume_sources;
- v->irq = irq;
set_handle_irq(vic_handle_irq);
vic_id++;
v->domain = irq_domain_add_simple(node, fls(valid_sources), irq,
@@ -282,6 +281,11 @@ static void __init vic_register(void __iomem *base, unsigned int irq,
for (i = 0; i < fls(valid_sources); i++)
if (valid_sources & (1 << i))
irq_create_mapping(v->domain, i);
+ /* If no base IRQ was passed, figure out our allocated base */
+ if (irq)
+ v->irq = irq;
+ else
+ v->irq = irq_find_mapping(v->domain, 0);
}
static void vic_ack_irq(struct irq_data *d)
--
1.8.4.2
next prev parent reply other threads:[~2014-01-22 13:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-22 13:31 [PATCH 0/5] ARM: integrator: cascaded IRQs on IM-PD1 Linus Walleij
2014-01-22 13:31 ` Linus Walleij [this message]
2014-02-03 9:22 ` [PATCH 1/5] irqchip: vic: update the base IRQ member correctly Linus Walleij
2014-01-22 13:31 ` [PATCH 2/5] irqchip: support cascaded VICs Linus Walleij
2014-02-03 9:23 ` Linus Walleij
2014-01-22 13:31 ` [PATCH 3/5] ARM: integrator: use managed resources for the IM-PD1 Linus Walleij
2014-01-22 13:31 ` [PATCH 4/5] ARM: integrator: register the IM-PD1 VIC Linus Walleij
2014-01-22 13:31 ` [PATCH 5/5] ARM: integrator: select AMBA bus and GPIO block Linus Walleij
2014-01-22 13:37 ` Russell King - ARM Linux
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=1390397471-6802-2-git-send-email-linus.walleij@linaro.org \
--to=linus.walleij@linaro.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).