From: tip-bot for Hans de Goede <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
hdegoede@redhat.com, tglx@linutronix.de,
maxime.ripard@free-electrons.com
Subject: [tip:irq/core] irqchip: sun4i: Don't ack IRQs > 0, fix acking of IRQ 0
Date: Fri, 14 Mar 2014 05:55:45 -0700 [thread overview]
Message-ID: <tip-e9df9e221665d40928e25a02c2700ac12eda7270@git.kernel.org> (raw)
In-Reply-To: <1394733834-26839-5-git-send-email-hdegoede@redhat.com>
Commit-ID: e9df9e221665d40928e25a02c2700ac12eda7270
Gitweb: http://git.kernel.org/tip/e9df9e221665d40928e25a02c2700ac12eda7270
Author: Hans de Goede <hdegoede@redhat.com>
AuthorDate: Thu, 13 Mar 2014 19:03:54 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 14 Mar 2014 13:43:33 +0100
irqchip: sun4i: Don't ack IRQs > 0, fix acking of IRQ 0
All IRQs except for IRQ 0 seem to not need acking, so drop acking for them.
The ENMI needs to have the ack done *after* clearing the interrupt source,
otherwise we will get a spurious interrupt for each real interrupt.
So use the new IRQCHIP_EOI_THREADED flag for this in combination with
handle_fasteoi_irq. This uses a separate irq_chip struct for IRQ 0,
since we only want this behavior for IRQ 0.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-sunxi@googlegroups.com
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: http://lkml.kernel.org/r/1394733834-26839-5-git-send-email-hdegoede@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/irqchip/irq-sun4i.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c
index 60a28c6..2029cc5 100644
--- a/drivers/irqchip/irq-sun4i.c
+++ b/drivers/irqchip/irq-sun4i.c
@@ -76,16 +76,29 @@ static void sun4i_irq_unmask(struct irq_data *irqd)
static struct irq_chip sun4i_irq_chip = {
.name = "sun4i_irq",
- .irq_ack = sun4i_irq_ack,
.irq_mask = sun4i_irq_mask,
.irq_unmask = sun4i_irq_unmask,
};
+/* IRQ 0 / the ENMI needs a late eoi call */
+static struct irq_chip sun4i_irq_chip_enmi = {
+ .name = "sun4i_irq",
+ .irq_eoi = sun4i_irq_ack,
+ .irq_mask = sun4i_irq_mask,
+ .irq_unmask = sun4i_irq_unmask,
+ .flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED,
+};
+
static int sun4i_irq_map(struct irq_domain *d, unsigned int virq,
irq_hw_number_t hw)
{
- irq_set_chip_and_handler(virq, &sun4i_irq_chip,
- handle_level_irq);
+ if (hw == 0)
+ irq_set_chip_and_handler(virq, &sun4i_irq_chip_enmi,
+ handle_fasteoi_irq);
+ else
+ irq_set_chip_and_handler(virq, &sun4i_irq_chip,
+ handle_level_irq);
+
set_irq_flags(virq, IRQF_VALID | IRQF_PROBE);
return 0;
prev parent reply other threads:[~2014-03-14 12:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 18:03 [PATCH v3 0/4] irq: sun4i IRQ 0 / ENMI fixes Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-13 18:03 ` [PATCH v3 1/4] irq: Add a new IRQCHIP_EOI_THREADED flag Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-13 18:17 ` Hans de Goede
2014-03-13 18:17 ` Hans de Goede
2014-03-13 18:17 ` Hans de Goede
2014-03-14 12:55 ` [tip:irq/core] genirq: " tip-bot for Thomas Gleixner
2014-03-13 18:03 ` [PATCH v3 2/4] irqchip: sun4i: Fix irq 0 not working Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-14 12:55 ` [tip:irq/core] " tip-bot for Hans de Goede
2014-03-13 18:03 ` [PATCH v3 3/4] irqchip: sun4i: Fix a comment about mask register initialization Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-14 12:55 ` [tip:irq/core] " tip-bot for Hans de Goede
2014-03-13 18:03 ` [PATCH v3 4/4] irqchip: sun4i: Don't ack IRQs != 0, fix acking of IRQ 0 Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-13 18:03 ` Hans de Goede
2014-03-14 12:55 ` tip-bot for Hans de Goede [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=tip-e9df9e221665d40928e25a02c2700ac12eda7270@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hdegoede@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=mingo@kernel.org \
--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.