Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757467Ab3EGGa6 (ORCPT ); Tue, 7 May 2013 02:30:58 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:9808 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756170Ab3EGGaz (ORCPT ); Tue, 7 May 2013 02:30:55 -0400 X-AuditID: cbfee690-b7f136d000000fea-2b-51889f9e9610 Date: Tue, 07 May 2013 06:30:54 +0000 (GMT) From: EUNBONG SONG Subject: MIPS: Test reault for enable interrupts before WAIT instruction patch To: "david.daney@cavium.com" , "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "linux-mips@linux-mips.org" , "jogo@openwrt.org" , "ralf@linux-mips.org" , manuel.lauss@gmail.com Reply-to: eunb.song@samsung.com MIME-version: 1.0 X-MTR: 20130507061510134@eunb.song Msgkey: 20130507061510134@eunb.song X-EPLocale: ko_KR.euc-kr X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-EPTrCode: X-EPTrName: X-MLAttribute: X-RootMTR: 20130507061510134@eunb.song X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N Content-type: text/plain; charset=euc-kr MIME-version: 1.0 Message-id: <15709790.301941367908253064.JavaMail.weblogic@epml12> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnleLIzCtJLcpLzFFi42I5/e+Zru68+R2BBiffilpc3jWHzYHR4/Mm uQDGKC6blNSczLLUIn27BK6Mfy3rGAsO6Fe0bXnH3MC4QK+LkZNDSEBFouX/d0YQW0LAROLD pNvsELaYxIV769kgapYxSqx7pwJTs29zN0sXIxdQfD6jRNuXj0wgCRagQZu+H2YFsdkEtCXe fnkAZgsL+EvM39wF1iAicJVJ4sqlBewQU+UlJp++DGbzCghKnJz5hAVig5LErVsHgTZzAMWV Ja5et4IIS0jMmn6BFcLmlZjR/hSqXE5i2tc1zBC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LUkvvzYx4buK14BJ4mzf/oYJzDKzkKSmoWkfRaS dmQ1CxhZVjGKphYkFxQnpVcY6hUn5haX5qXrJefnbmIEp6JnC3cwfjlvfYhRgINRiYdX4VR7 oBBrYllxZe4hRgkOZiURXmntjkAh3pTEyqrUovz4otKc1OJDjMnASJvILCWanA9Mk3kl8YbG BsaGhpbmBqaGRhakCSuJ8z5ttQ4UEkhPLEnNTk0tSC2C2cLEwSnVwJggJcDkVusiVbJ0g3Di xh8FUsreDOkq8sbtH7a4vt94RX3fyjaf5ZpTzn6d3rXXVyiUISuLdeWDaY0ZH3Y5W3X/fjjZ K7jJfRljqMP7k5qCugzhS++fLr49Qcb/gUX+1WLh3hU+HrlLJD8peh9t6o67sctFafpE0XXP cyOXe9x5dnhTXt7cP0osxRmJhlrMRcWJAPhlpJ2JAwAA DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id r476V2bM032524 Content-Length: 4495 Lines: 106 Hello. I tested with two patches. The first one is thomas gleixner's patch. The patch is as follow. This patch works well without any problem. Index: linux-2.6/arch/mips/kernel/process.c =================================================================== --- linux-2.6.orig/arch/mips/kernel/process.c +++ linux-2.6/arch/mips/kernel/process.c @@ -50,13 +50,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 -- The second one is david daney's patch. The patch is as follow. arch/mips/kernel/genex.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index ecb347c..57cda9a 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S @@ -132,12 +132,13 @@ LEAF(r4k_wait) .set noreorder /* start of rollback region */ LONG_L t0, TI_FLAGS($28) - nop andi t0, _TIF_NEED_RESCHED bnez t0, 1f nop - nop - nop + /* Enable interrupts so WAIT will complete */ + mfc0 t0, CP0_STATUS + ori t0, ST0_IE + mtc0 t0, CP0_STATUS .set mips3 wait /* end of rollback region (the region size must be power of two) */ After apply this patch. I got two error message. The first one is as follow [ 124.661211] Checking for the daddi bug... no. [ 124.665737] ------------[ cut here ]------------ [ 124.670187] WARNING: at kernel/cpu/idle.c:96 cpu_startup_entry+0x150/0x178() [ 124.677209] Modules linked in: [ 124.680251] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.9.0+ #40 [ 124.686237] Stack : 0000000000000004 0000000000000034 ffffffff80fa0000 ffffffff80292558 0000000000000000 ffffffff80fa0000 0000000000000001 ffffffff80293810 0000000000000000 0000000000000000 ffffffff81080000 ffffffff81080000 ffffffff80e2acf0 ffffffff80f8f977 ffffffff80f8fa80 ffffffff80e31730 0000000000000001 0000000000000004 ffffffff00000000 0000000000000004 ffffffffc05633f0 ffffffff806ef728 ffffffff80f57d08 ffffffff80290a74 ffffffffc05633f0 ffffffff80293c40 000000000000003e ffffffff80e2acf0 0000000000000000 ffffffff80f57c30 00ffffff80f8fdc0 ffffffff802908c0 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ffffffff80272498 0000000000000000 0000000000000000 ... [ 124.751163] Call Trace: [ 124.753599] [] show_stack+0x68/0x80 [ 124.758634] [] warn_slowpath_common+0x78/0xa8 [ 124.764533] [] cpu_startup_entry+0x150/0x178 [ 124.770351] [] start_kernel+0x440/0x45c [ 124.775728] [ 124.777219] ---[ end trace 9179e654e5693e72 ]--- After boot process is done the follow error message is printed periodically. [ 284.751007] INFO: rcu_preempt detected stalls on CPUs/tasks: { 6} (detected by 1, t=14712 jiffies, g=18446744073709551344, c=18446744073709551343, q=2437) [ 284.764878] Task dump for CPU 6: [ 284.768105] swapper/6 R running task 0 0 1 0x00100000 [ 284.775174] Stack : 0000005311112000 ffffffff80f60000 ffffffff80f60000 a800000001d2d950 0000000000000018 ffffffff81080000 ffffffff81080000 0000000000000000 ffffffff81010000 ffffffff8030893c 4256e5715da6083d 800000040f800000 0000000000000018 ffffffff81080000 ffffffff81080000 ffffffff80264f3c ffffffff80e31730 0000000000000000 ffffffff80e31730 ffffffff80f90000 ffffffff80fd0000 ffffffff8026c760 0000000000000000 0000000010008ce1 0000000000100000 a8000000414e4010 ffffffff80f8bb18 0000000000000000 0000005311112000 0000000000000001 0000000000000001 0000000000000000 ffffffff80f8bc58 a800000001d32c60 a8000000414e7fe0 0000000000008c00 a80000003f7d8000 0000000000000000 ffffffff80fd0000 ffffffff80e31730 ... [ 284.840704] Call Trace: [ 284.843153] [] __schedule+0x3b0/0x938 [ 284.848377] Thanks????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?