From f6ad0fc9373a736f9640d698e557c86dc6074edd Mon Sep 17 00:00:00 2001 From: jogo Date: Sun, 19 May 2013 18:36:15 +0000 Subject: kernel: generic: add 3.10-rc1 support Signed-off-by: Jonas Gorski git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36663 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...3-MIPS-Enable-interrupts-in-arch_cpu_idle.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 target/linux/generic/patches-3.10/003-MIPS-Enable-interrupts-in-arch_cpu_idle.patch (limited to 'target/linux/generic/patches-3.10/003-MIPS-Enable-interrupts-in-arch_cpu_idle.patch') diff --git a/target/linux/generic/patches-3.10/003-MIPS-Enable-interrupts-in-arch_cpu_idle.patch b/target/linux/generic/patches-3.10/003-MIPS-Enable-interrupts-in-arch_cpu_idle.patch new file mode 100644 index 000000000..2ffc75e25 --- /dev/null +++ b/target/linux/generic/patches-3.10/003-MIPS-Enable-interrupts-in-arch_cpu_idle.patch @@ -0,0 +1,45 @@ +From 4fec4a2d70efa390268d1098bd4b008dda0e399e Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Thu, 2 May 2013 13:33:52 +0000 +Subject: [PATCH 3/3] MIPS: Enable interrupts in arch_cpu_idle() + +commit cdbedc61c8 (mips: Use generic idle loop) broke MIPS as I did +not realize that MIPS wants to invoke the wait instructions with +interrupts enabled. Don't ask why that works correctly; Ralf suggested +to get thoroughly drunk before even thinking about it. Looking sober +at commit c65a5480 ([MIPS] Fix potential latency problem due to +non-atomic cpu_wait) is not recommended. + +Enable interrupts in arch_cpu_idle() on mips to repair the issue. + +Reported-and-tested-by: Jonas Gorski +Reported-by: EunBong Song +Booze-recommended-by: Ralf Baechle +Signed-off-by: Thomas Gleixner +--- + arch/mips/kernel/process.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- a/arch/mips/kernel/process.c ++++ b/arch/mips/kernel/process.c +@@ -51,13 +51,18 @@ void arch_cpu_idle_dead(void) + } + #endif + +-void arch_cpu_idle(void) ++static void smtc_idle_hook(void) + { + #ifdef CONFIG_MIPS_MT_SMTC + extern void smtc_idle_loop_hook(void); +- + smtc_idle_loop_hook(); + #endif ++} ++ ++void arch_cpu_idle(void) ++{ ++ local_irq_enable(); ++ smtc_idle_hook(); + if (cpu_wait) + (*cpu_wait)(); + else -- cgit v1.2.3