* [PATCH 0/2] ARM: sun7i/sun6i: Fix broken kernel on sun6i/A31 @ 2014-03-27 17:02 ` Carlo Caione 0 siblings, 0 replies; 12+ messages in thread From: Carlo Caione @ 2014-03-27 17:02 UTC (permalink / raw) To: linux-arm-kernel 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] 12+ messages in thread
* [PATCH 0/2] ARM: sun7i/sun6i: Fix broken kernel on sun6i/A31 @ 2014-03-27 17:02 ` Carlo Caione 0 siblings, 0 replies; 12+ 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] 12+ messages in thread
* [PATCH 1/2] ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller @ 2014-03-27 17:02 ` Carlo Caione 0 siblings, 0 replies; 12+ messages in thread From: Carlo Caione @ 2014-03-27 17:02 UTC (permalink / raw) To: linux-arm-kernel From: Hans de Goede <hdegoede@redhat.com> 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@redhat.com> Signed-off-by: Carlo Caione <carlo@caione.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 at 01c20800 { -- 1.8.4.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/2] ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller @ 2014-03-27 17:02 ` Carlo Caione 0 siblings, 0 replies; 12+ 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] 12+ messages in thread
* [tip:irq/core] ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller 2014-03-27 17:02 ` Carlo Caione (?) @ 2014-03-31 9:16 ` tip-bot for Hans de Goede -1 siblings, 0 replies; 12+ messages in thread From: tip-bot for Hans de Goede @ 2014-03-31 9:16 UTC (permalink / raw) To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, hdegoede, carlo, tglx Commit-ID: 536a44d4277709303755e6365a059f54f4aa5403 Gitweb: http://git.kernel.org/tip/536a44d4277709303755e6365a059f54f4aa5403 Author: Hans de Goede <hdegoede@redhat.com> AuthorDate: Thu, 27 Mar 2014 18:02:38 +0100 Committer: Thomas Gleixner <tglx@linutronix.de> CommitDate: Mon, 31 Mar 2014 11:12:57 +0200 ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller 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@redhat.com> Signed-off-by: Carlo Caione <carlo@caione.org> Cc: maxime.ripard@free-electrons.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@googlegroups.com Link: http://lkml.kernel.org/r/1395939759-11135-2-git-send-email-carlo@caione.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- 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 eea6033..fbdf88f 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 { ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/2] ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller @ 2014-03-31 11:02 ` Maxime Ripard 0 siblings, 0 replies; 12+ messages in thread From: Maxime Ripard @ 2014-03-31 11:02 UTC (permalink / raw) To: linux-arm-kernel On Thu, Mar 27, 2014 at 06:02:38PM +0100, Carlo Caione wrote: > From: Hans de Goede <hdegoede@redhat.com> > > 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@redhat.com> > Signed-off-by: Carlo Caione <carlo@caione.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140331/ce3c2f12/attachment-0001.sig> ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] ARM: sun7i/sun6i: dts: Fix IRQ number for sun6i NMI controller @ 2014-03-31 11:02 ` Maxime Ripard 0 siblings, 0 replies; 12+ 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] 12+ messages in thread
* [PATCH 2/2] ARM: sun7i/sun6i: irqchip: Disable NMI before registering the handler @ 2014-03-27 17:02 ` Carlo Caione 0 siblings, 0 replies; 12+ messages in thread From: Carlo Caione @ 2014-03-27 17:02 UTC (permalink / raw) To: linux-arm-kernel From: Hans de Goede <hdegoede@redhat.com> 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@redhat.com> Signed-off-by: Carlo Caione <carlo@caione.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] 12+ messages in thread
* [PATCH 2/2] ARM: sun7i/sun6i: irqchip: Disable NMI before registering the handler @ 2014-03-27 17:02 ` Carlo Caione 0 siblings, 0 replies; 12+ 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] 12+ messages in thread
* [tip:irq/core] irqchip: sun7i/sun6i: Disable NMI before registering the handler 2014-03-27 17:02 ` Carlo Caione (?) @ 2014-03-31 9:16 ` tip-bot for Hans de Goede -1 siblings, 0 replies; 12+ messages in thread From: tip-bot for Hans de Goede @ 2014-03-31 9:16 UTC (permalink / raw) To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, hdegoede, carlo, tglx Commit-ID: 1b422ecd27866985b9f35d0d2b5ae6e9122dd4c0 Gitweb: http://git.kernel.org/tip/1b422ecd27866985b9f35d0d2b5ae6e9122dd4c0 Author: Hans de Goede <hdegoede@redhat.com> AuthorDate: Thu, 27 Mar 2014 18:02:39 +0100 Committer: Thomas Gleixner <tglx@linutronix.de> CommitDate: Mon, 31 Mar 2014 11:12:57 +0200 irqchip: sun7i/sun6i: Disable NMI before registering the handler 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@redhat.com> Signed-off-by: Carlo Caione <carlo@caione.org> Cc: maxime.ripard@free-electrons.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-sunxi@googlegroups.com Link: http://lkml.kernel.org/r/1395939759-11135-3-git-send-email-carlo@caione.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- 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: ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] ARM: sun7i/sun6i: irqchip: Disable NMI before registering the handler @ 2014-03-31 11:06 ` Maxime Ripard 0 siblings, 0 replies; 12+ messages in thread From: Maxime Ripard @ 2014-03-31 11:06 UTC (permalink / raw) To: linux-arm-kernel On Thu, Mar 27, 2014 at 06:02:39PM +0100, Carlo Caione wrote: > From: Hans de Goede <hdegoede@redhat.com> > > 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@redhat.com> > Signed-off-by: Carlo Caione <carlo@caione.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Thanks! -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140331/ece0e7d5/attachment.sig> ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] ARM: sun7i/sun6i: irqchip: Disable NMI before registering the handler @ 2014-03-31 11:06 ` Maxime Ripard 0 siblings, 0 replies; 12+ 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] 12+ messages in thread
end of thread, other threads:[~2014-03-31 11:06 UTC | newest] Thread overview: 12+ 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 2014-03-27 17:02 ` Carlo Caione 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 2014-03-31 9:16 ` [tip:irq/core] " tip-bot for Hans de Goede 2014-03-31 11:02 ` [PATCH 1/2] " Maxime Ripard 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 2014-03-27 17:02 ` Carlo Caione 2014-03-31 9:16 ` [tip:irq/core] irqchip: sun7i/sun6i: " tip-bot for Hans de Goede 2014-03-31 11:06 ` [PATCH 2/2] ARM: sun7i/sun6i: irqchip: " Maxime Ripard 2014-03-31 11:06 ` Maxime Ripard
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.