* [PATCH 0/2] ARM: sun7i/sun6i: Fix broken kernel on sun6i/A31
@ 2014-03-27 17:02 Carlo Caione
[not found] ` <1395939759-11135-1-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Carlo Caione @ 2014-03-27 17:02 UTC (permalink / raw)
To: tglx-hfZtesqFncYOwBW4kG4KsQ, hdegoede-H+wXaHxf7aLQT0dZR+AlfA,
maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Carlo Caione
These fixes are proposed by Hans de Goede to fix the broken kernel on
sun6i/A31. The major problem is that the IRQ number for NMI on sun6i is wrong.
Besides that, Hans proposed a fix to avoid having sporious interrupts when the
NMI line is asserted but no driver has claimed the downstream interrupt of the
NMI.
Hans de Goede (2):
ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller
ARM: sun7i/sun6i: irqchip: Disable NMI before registering the handler
arch/arm/boot/dts/sun6i-a31.dtsi | 2 +-
drivers/irqchip/irq-sunxi-nmi.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
--
1.8.4.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller
[not found] ` <1395939759-11135-1-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
@ 2014-03-27 17:02 ` Carlo Caione
[not found] ` <1395939759-11135-2-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
2014-03-27 17:02 ` [PATCH 2/2] ARM: sun7i/sun6i: irqchip: Disable NMI before registering the handler Carlo Caione
1 sibling, 1 reply; 5+ messages in thread
From: Carlo Caione @ 2014-03-27 17:02 UTC (permalink / raw)
To: tglx-hfZtesqFncYOwBW4kG4KsQ, hdegoede-H+wXaHxf7aLQT0dZR+AlfA,
maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Carlo Caione
From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
The IRQ line used in sun6i-a31.dtsi for the NMI controller is wrong.
This causes a IRQ storm since the NMI controller is repeatedly fired.
This patch fixes this problem assigning the correct IRQ number to the
NMI controller.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
---
arch/arm/boot/dts/sun6i-a31.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index 3b95cb5..38d43fe 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -195,7 +195,7 @@
interrupt-controller;
#interrupt-cells = <2>;
reg = <0x01f00c0c 0x38>;
- interrupts = <0 0 4>;
+ interrupts = <0 32 4>;
};
pio: pinctrl@01c20800 {
--
1.8.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ARM: sun7i/sun6i: irqchip: Disable NMI before registering the handler
[not found] ` <1395939759-11135-1-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
2014-03-27 17:02 ` [PATCH 1/2] ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller Carlo Caione
@ 2014-03-27 17:02 ` Carlo Caione
[not found] ` <1395939759-11135-3-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
1 sibling, 1 reply; 5+ messages in thread
From: Carlo Caione @ 2014-03-27 17:02 UTC (permalink / raw)
To: tglx-hfZtesqFncYOwBW4kG4KsQ, hdegoede-H+wXaHxf7aLQT0dZR+AlfA,
maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Carlo Caione
From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
It is advisable to disable the NMI before registering the IRQ handler as
registering the IRQ handler unmasks the IRQ on the GIC, so if U-Boot has
left the NMI enabled and the NMI pin is active we will immediately get
an interrupt before any driver has claimed the downstream interrupt of
the NMI.
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
---
drivers/irqchip/irq-sunxi-nmi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
index 1c8566c..12f547a 100644
--- a/drivers/irqchip/irq-sunxi-nmi.c
+++ b/drivers/irqchip/irq-sunxi-nmi.c
@@ -179,12 +179,12 @@ static int __init sunxi_sc_nmi_irq_init(struct device_node *node,
gc->chip_types[1].regs.type = reg_offs->ctrl;
gc->chip_types[1].handler = handle_edge_irq;
- irq_set_handler_data(irq, domain);
- irq_set_chained_handler(irq, sunxi_sc_nmi_handle_irq);
-
sunxi_sc_nmi_write(gc, reg_offs->enable, 0);
sunxi_sc_nmi_write(gc, reg_offs->pend, 0x1);
+ irq_set_handler_data(irq, domain);
+ irq_set_chained_handler(irq, sunxi_sc_nmi_handle_irq);
+
return 0;
fail_irqd_remove:
--
1.8.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller
[not found] ` <1395939759-11135-2-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
@ 2014-03-31 11:02 ` Maxime Ripard
0 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2014-03-31 11:02 UTC (permalink / raw)
To: Carlo Caione
Cc: tglx-hfZtesqFncYOwBW4kG4KsQ, hdegoede-H+wXaHxf7aLQT0dZR+AlfA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
devicetree-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
On Thu, Mar 27, 2014 at 06:02:38PM +0100, Carlo Caione wrote:
> From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>
> The IRQ line used in sun6i-a31.dtsi for the NMI controller is wrong.
> This causes a IRQ storm since the NMI controller is repeatedly fired.
> This patch fixes this problem assigning the correct IRQ number to the
> NMI controller.
>
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ARM: sun7i/sun6i: irqchip: Disable NMI before registering the handler
[not found] ` <1395939759-11135-3-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
@ 2014-03-31 11:06 ` Maxime Ripard
0 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2014-03-31 11:06 UTC (permalink / raw)
To: Carlo Caione
Cc: tglx-hfZtesqFncYOwBW4kG4KsQ, hdegoede-H+wXaHxf7aLQT0dZR+AlfA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
devicetree-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
On Thu, Mar 27, 2014 at 06:02:39PM +0100, Carlo Caione wrote:
> From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>
> It is advisable to disable the NMI before registering the IRQ handler as
> registering the IRQ handler unmasks the IRQ on the GIC, so if U-Boot has
> left the NMI enabled and the NMI pin is active we will immediately get
> an interrupt before any driver has claimed the downstream interrupt of
> the NMI.
>
> Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Acked-by: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Thanks!
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-31 11:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 17:02 [PATCH 0/2] ARM: sun7i/sun6i: Fix broken kernel on sun6i/A31 Carlo Caione
[not found] ` <1395939759-11135-1-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
2014-03-27 17:02 ` [PATCH 1/2] ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller Carlo Caione
[not found] ` <1395939759-11135-2-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
2014-03-31 11:02 ` Maxime Ripard
2014-03-27 17:02 ` [PATCH 2/2] ARM: sun7i/sun6i: irqchip: Disable NMI before registering the handler Carlo Caione
[not found] ` <1395939759-11135-3-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
2014-03-31 11:06 ` Maxime Ripard
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).