On 01/15/2014 10:26 AM, Ian Campbell wrote:
On Wed, 2014-01-15 at 10:15 +0100, Sebastian Hesselbarth wrote:
On 01/15/14 09:40, Ian Campbell wrote:
The bootlogs are below or in the bug. It stops after "Console: colour
dummy device 80x30", I think next would normally be the
BogoMIPS/calibrate_delay output.
That would indicate the timer (clocksource) or irq (irqchip) is not
running correctly. Again, that could be non-DT and DT fighting for it.
I'll investigate that.
That seems logical.
In the meantime, can you recompile your kernel and set
CONFIG_ARCH_KIRKWOOD_DT=n ?
I can confirm that v3.13-rc8 with CONFIG_ARCH_KIRKWOOD_DT=n works.
Ian,
please try the following two patches on top of v3.13-rc8 and report
back, if it solves the regression.
I have tested this on a revived non-DT Kirkwood Dockstar with and
without DT support enabled. I also compile tested it for Orion5x
and Dove.
While I will not send any patches for non-DT mach-dove boards as
none of them is really used anymore, Gregory is on Cc for hopefully
testing orion5x.
For possible -stable patches, I know it is quite a huge patch but
I didn't dare to touch arch/arm/kernel/foo for this kind of regression.
Sebastian
(I hope the fscking Thunderbird inlines both patches correctly)
>From 551749f716c6a362ccbbfde74ef47c2cbb372805 Mon Sep 17 00:00:00 2001
From: Sebastian Hesselbarth <sebastian.hesselba...@gmail.com>
Date: Wed, 15 Jan 2014 20:00:21 +0100
Subject: [PATCH 1/2] ARM: orion: provide C-style interrupt handler for
MULTI_IRQ_HANDLER
Compiling with both non-DT and DT support enabled, will break ASM irq
handler used by non-DT boards. Therefore, we provide a C-style irq
handler even for non-DT boards, if MULTI_IRQ_HANDLER is set.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselba...@gmail.com>
---
arch/arm/plat-orion/include/plat/irq.h | 1 +
arch/arm/plat-orion/irq.c | 43 ++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+)
diff --git a/arch/arm/plat-orion/include/plat/irq.h b/arch/arm/plat-orion/include/plat/irq.h
index 50547e417936..75a38b577460 100644
--- a/arch/arm/plat-orion/include/plat/irq.h
+++ b/arch/arm/plat-orion/include/plat/irq.h
@@ -11,6 +11,7 @@
#ifndef __PLAT_IRQ_H
#define __PLAT_IRQ_H
+void orion_legacy_handle_irq(struct pt_regs *regs);
void orion_irq_init(unsigned int irq_start, void __iomem *maskaddr);
void __init orion_dt_init_irq(void);
#endif
diff --git a/arch/arm/plat-orion/irq.c b/arch/arm/plat-orion/irq.c
index c492e1b3dfdb..82dd811b05c4 100644
--- a/arch/arm/plat-orion/irq.c
+++ b/arch/arm/plat-orion/irq.c
@@ -15,8 +15,51 @@
#include <linux/io.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
+#include <asm/exception.h>
#include <plat/irq.h>
#include <plat/orion-gpio.h>
+#include <mach/bridge-regs.h>
+
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+/*
+ * Compiling with both non-DT and DT support enabled, will
+ * break asm irq handler used by non-DT boards. Therefore,
+ * we provide a C-style irq handler even for non-DT boards,
+ * if MULTI_IRQ_HANDLER is set.
+ */
+
+#ifdef CONFIG_ARCH_ORION5X
+/* Orion5x only has one irq cause and different macro names */
+# define IRQ_VIRT_BASE MAIN_IRQ_CAUSE
+# define IRQ_CAUSE_LOW_OFF 0x00
+# define IRQ_MASK_LOW_OFF 0x04
+#endif
+
+static void __iomem *orion_irq_base = IRQ_VIRT_BASE;
+
+asmlinkage void
+__exception_irq_entry orion_legacy_handle_irq(struct pt_regs *regs)
+{
+ u32 stat;
+
+ stat = readl_relaxed(orion_irq_base + IRQ_CAUSE_LOW_OFF);
+ stat &= readl_relaxed(orion_irq_base + IRQ_MASK_LOW_OFF);
+ if (stat) {
+ int hwirq = __fls(stat);
+ handle_IRQ(hwirq, regs);
+ return;
+ }
+#ifndef CONFIG_ARCH_ORION5X
+ stat = readl_relaxed(orion_irq_base + IRQ_CAUSE_HIGH_OFF);
+ stat &= readl_relaxed(orion_irq_base + IRQ_MASK_HIGH_OFF);
+ if (stat) {
+ int hwirq = 32 + __fls(stat);
+ handle_IRQ(hwirq, regs);
+ return;
+ }
+#endif
+}
+#endif
void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
{
--
1.8.5.2
>From 07c46c0d285d2c9d4f0ec4406a80a18f2f65fe0c Mon Sep 17 00:00:00 2001
From: Sebastian Hesselbarth <sebastian.hesselba...@gmail.com>
Date: Wed, 15 Jan 2014 20:34:08 +0100
Subject: [PATCH 2/2] ARM: kirkwood: set C-style handle_irq if
MULTI_IRQ_HANDLER is set
Compiling with both non-DT and DT support enabled, will break ASM
irq handler used by non-DT boards. This fixes a regression for
those kernels by installing a corresponding C-style handle_irq
callback if MULTI_IRQ_HANDLER is set.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselba...@gmail.com>
---
arch/arm/mach-kirkwood/d2net_v2-setup.c | 4 ++++
arch/arm/mach-kirkwood/netxbig_v2-setup.c | 7 +++++++
arch/arm/mach-kirkwood/openrd-setup.c | 10 ++++++++++
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c | 4 ++++
arch/arm/mach-kirkwood/rd88f6281-setup.c | 4 ++++
arch/arm/mach-kirkwood/t5325-setup.c | 4 ++++
arch/arm/mach-kirkwood/ts219-setup.c | 4 ++++
arch/arm/mach-kirkwood/ts41x-setup.c | 4 ++++
8 files changed, 41 insertions(+)
diff --git a/arch/arm/mach-kirkwood/d2net_v2-setup.c b/arch/arm/mach-kirkwood/d2net_v2-setup.c
index 453418063c1e..7b475af4f904 100644
--- a/arch/arm/mach-kirkwood/d2net_v2-setup.c
+++ b/arch/arm/mach-kirkwood/d2net_v2-setup.c
@@ -32,6 +32,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
+#include <plat/irq.h>
#include <linux/platform_data/leds-kirkwood-ns2.h>
#include "common.h"
#include "mpp.h"
@@ -225,6 +226,9 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2")
.init_machine = d2net_v2_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
index 913d032cdb19..edcd8071a359 100644
--- a/arch/arm/mach-kirkwood/netxbig_v2-setup.c
+++ b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
@@ -32,6 +32,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
+#include <plat/irq.h>
#include <linux/platform_data/leds-kirkwood-netxbig.h>
#include "common.h"
#include "mpp.h"
@@ -403,6 +404,9 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
.init_machine = netxbig_v2_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
@@ -415,6 +419,9 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
.init_machine = netxbig_v2_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
index e5cf84103583..86a0e77ff695 100644
--- a/arch/arm/mach-kirkwood/openrd-setup.c
+++ b/arch/arm/mach-kirkwood/openrd-setup.c
@@ -20,6 +20,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
+#include <plat/irq.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include "common.h"
#include "mpp.h"
@@ -222,6 +223,9 @@ MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
.init_machine = openrd_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
@@ -235,6 +239,9 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board")
.init_machine = openrd_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
@@ -248,6 +255,9 @@ MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board")
.init_machine = openrd_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index e4fd3129d36f..57c347987ba5 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -19,6 +19,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
+#include <plat/irq.h>
#include <plat/orion-gpio.h>
#include "common.h"
@@ -83,6 +84,9 @@ MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board")
.init_machine = rd88f6192_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c
index 5154bd2a3ad3..723d9a64ec0e 100644
--- a/arch/arm/mach-kirkwood/rd88f6281-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
@@ -20,6 +20,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
+#include <plat/irq.h>
#include <linux/platform_data/mmc-mvsdio.h>
#include "common.h"
#include "mpp.h"
@@ -122,6 +123,9 @@ MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board")
.init_machine = rd88f6281_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c
index 8736f8c97518..7ffe94403079 100644
--- a/arch/arm/mach-kirkwood/t5325-setup.c
+++ b/arch/arm/mach-kirkwood/t5325-setup.c
@@ -26,6 +26,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
+#include <plat/irq.h>
#include "common.h"
#include "mpp.h"
@@ -210,6 +211,9 @@ MACHINE_START(T5325, "HP t5325 Thin Client")
.init_machine = hp_t5325_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
diff --git a/arch/arm/mach-kirkwood/ts219-setup.c b/arch/arm/mach-kirkwood/ts219-setup.c
index e1267d6b468f..5c4772fcbe60 100644
--- a/arch/arm/mach-kirkwood/ts219-setup.c
+++ b/arch/arm/mach-kirkwood/ts219-setup.c
@@ -22,6 +22,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
+#include <plat/irq.h>
#include "common.h"
#include "mpp.h"
#include "tsx1x-common.h"
@@ -136,6 +137,9 @@ MACHINE_START(TS219, "QNAP TS-119/TS-219")
.init_machine = qnap_ts219_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c
index 81d585806b2f..3256a7933c74 100644
--- a/arch/arm/mach-kirkwood/ts41x-setup.c
+++ b/arch/arm/mach-kirkwood/ts41x-setup.c
@@ -24,6 +24,7 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
+#include <plat/irq.h>
#include "common.h"
#include "mpp.h"
#include "tsx1x-common.h"
@@ -180,6 +181,9 @@ MACHINE_START(TS41X, "QNAP TS-41x")
.init_machine = qnap_ts41x_init,
.map_io = kirkwood_map_io,
.init_early = kirkwood_init_early,
+#ifdef CONFIG_MULTI_IRQ_HANDLER
+ .handle_irq = orion_legacy_handle_irq,
+#endif
.init_irq = kirkwood_init_irq,
.init_time = kirkwood_timer_init,
.restart = kirkwood_restart,
--
1.8.5.2