Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758397Ab1FWAL6 (ORCPT ); Wed, 22 Jun 2011 20:11:58 -0400 Received: from sm-d311v.smileserver.ne.jp ([203.211.202.206]:12786 "EHLO sm-d311v.smileserver.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757992Ab1FWAL4 (ORCPT ); Wed, 22 Jun 2011 20:11:56 -0400 Message-ID: <4E0284C7.30909@dsn.okisemi.com> Date: Thu, 23 Jun 2011 09:11:51 +0900 From: Tomoya MORINAGA User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Alexander Stein , "Wang, Yong Y" CC: Vinod Koul , Dan Williams , linux-kernel@vger.kernel.org, "Wang, Qi" , "toshiharu-linux@dsn.okisemi.com" Subject: Re: [PATCH] pch_dma: Fix channel locking References: <1308755133-8605-1-git-send-email-alexander.stein@systec-electronic.com> In-Reply-To: <1308755133-8605-1-git-send-email-alexander.stein@systec-electronic.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4120 Lines: 103 (2011/06/23 0:05), Alexander Stein wrote: > Fix for the following INFO message > > ================================= > [ INFO: inconsistent lock state ] > 2.6.39+ #89 > --------------------------------- > inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. > rs232/822 [HC1[1]:SC0[0]:HE0:SE1] takes: > (&(&pd_chan->lock)->rlock){?.....}, at: [] pdc_desc_get+0x16/0xab > {HARDIRQ-ON-W} state was registered at: > [] mark_irqflags+0xbd/0x11a > [] __lock_acquire+0x501/0x6bb > [] lock_acquire+0x63/0x7b > [] _raw_spin_lock_bh+0x43/0x51 > [] pd_alloc_chan_resources+0x92/0x11e > [] dma_chan_get+0x9b/0x107 > [] __dma_request_channel+0x61/0xdc > [] pch_request_dma+0x61/0x19e > [] pch_uart_startup+0x16a/0x1a2 > [] uart_startup+0x87/0x147 > [] uart_open+0x117/0x13e > [] tty_open+0x23c/0x34c > [] chrdev_open+0x140/0x15f > [] __dentry_open.clone.14+0x14a/0x22b > [] nameidata_to_filp+0x36/0x40 > [] do_last+0x513/0x635 > [] path_openat+0x9c/0x2aa > [] do_filp_open+0x27/0x69 > [] do_sys_open+0xfd/0x184 > [] sys_open+0x24/0x2a > [] sysenter_do_call+0x12/0x32 > irq event stamp: 2522 > hardirqs last enabled at (2521): [] _raw_spin_unlock_irqrestore+0x36/0x52 > hardirqs last disabled at (2522): [] common_interrupt+0x27/0x34 > softirqs last enabled at (2354): [] __do_softirq+0x10a/0x11a > softirqs last disabled at (2299): [] do_softirq+0x57/0xa4 > > other info that might help us debug this: > 2 locks held by rs232/822: > #0: (&tty->atomic_write_lock){+.+.+.}, at: [] tty_write_lock+0x14/0x3c > #1: (&port_lock_key){-.....}, at: [] pch_uart_interrupt+0x17/0x1e9 > > stack backtrace: > Pid: 822, comm: rs232 Not tainted 2.6.39+ #89 > Call Trace: > [] ? printk+0x19/0x1b > [] print_usage_bug+0x184/0x18f > [] ? print_irq_inversion_bug+0x10e/0x10e > [] mark_lock_irq+0xa5/0x1f6 > [] mark_lock+0x208/0x2d7 > [] mark_irqflags+0x55/0x11a > [] __lock_acquire+0x501/0x6bb > [] ? dump_trace+0x92/0xb6 > [] lock_acquire+0x63/0x7b > [] ? pdc_desc_get+0x16/0xab > [] _raw_spin_lock+0x3e/0x4c > [] ? pdc_desc_get+0x16/0xab > [] pdc_desc_get+0x16/0xab > [] ? __lock_acquire+0x653/0x6bb > [] pd_prep_slave_sg+0x7c/0x1cb > [] ? nommu_map_sg+0x6e/0x81 > [] dma_handle_tx+0x2cf/0x344 > [] ? pch_uart_interrupt+0x17/0x1e9 > [] pch_uart_interrupt+0x160/0x1e9 > [] handle_irq_event_percpu+0x25/0x127 > [] handle_irq_event+0x2c/0x43 > [] ? handle_fasteoi_irq+0x84/0x84 > [] handle_edge_irq+0xac/0xce > [] ? do_IRQ+0x38/0x9d > [] ? common_interrupt+0x2e/0x34 > [] ? __lock_acquire+0x1f6/0x6bb > [] ? _raw_spin_unlock_irqrestore+0x38/0x52 > [] ? uart_start+0x2d/0x32 > [] ? uart_flush_chars+0x8/0xa > [] ? n_tty_write+0x12c/0x1c6 > [] ? try_to_wake_up+0x251/0x251 > [] ? tty_write+0x169/0x1dc > [] ? n_tty_ioctl+0xb7/0xb7 > [] ? vfs_write+0x91/0x10d > [] ? tty_write_lock+0x3c/0x3c > [] ? sys_write+0x3e/0x63 > [] ? sysenter_do_call+0x12/0x32 > To: Yong Y You wrote these spin_lock_bh(s), right ? Could you tell us your opinion ? To: Alexander Thank you for your report. How can I see the above kernel error log ? Let me know your test condition. -- tomoya OKI SEMICONDUCTOR CO., LTD. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/