Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752855AbbFHK7i (ORCPT ); Mon, 8 Jun 2015 06:59:38 -0400 Received: from mga09.intel.com ([134.134.136.24]:62507 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751818AbbFHK7a (ORCPT ); Mon, 8 Jun 2015 06:59:30 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,573,1427785200"; d="scan'208";a="583978398" Date: Mon, 8 Jun 2015 16:30:52 +0530 From: Vinod Koul To: Ludovic Desroches Cc: linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, nicolas.ferre@atmel.com, maxime.ripard@free-electrons.com Subject: Re: [PATCH v2 1/3] dmaengine: at_xdmac: lock fixes Message-ID: <20150608110052.GG28601@localhost> References: <1433751820-26142-1-git-send-email-ludovic.desroches@atmel.com> <1433752399-26231-1-git-send-email-ludovic.desroches@atmel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433752399-26231-1-git-send-email-ludovic.desroches@atmel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2049 Lines: 47 On Mon, Jun 08, 2015 at 10:33:14AM +0200, Ludovic Desroches wrote: > Using _bh variant for spin locks causes this kind of warning: > Starting logging: ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 3 at /ssd_drive/linux/kernel/softirq.c:151 > __local_bh_enable_ip+0xe8/0xf4() > Modules linked in: > CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.1.0-rc2+ #94 > Hardware name: Atmel SAMA5 > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] > (warn_slowpath_common+0x80/0xac) > [] (warn_slowpath_common) from [] > (warn_slowpath_null+0x1c/0x24) > [] (warn_slowpath_null) from [] > (__local_bh_enable_ip+0xe8/0xf4) > [] (__local_bh_enable_ip) from [] > (at_xdmac_device_terminate_all+0xf4/0x100) > [] (at_xdmac_device_terminate_all) from [] > (atmel_complete_tx_dma+0x34/0xf4) > [] (atmel_complete_tx_dma) from [] > (at_xdmac_tasklet+0x14c/0x1ac) > [] (at_xdmac_tasklet) from [] > (tasklet_action+0x68/0xb4) > [] (tasklet_action) from [] > (__do_softirq+0xfc/0x238) > [] (__do_softirq) from [] (run_ksoftirqd+0x28/0x34) > [] (run_ksoftirqd) from [] > (smpboot_thread_fn+0x138/0x18c) > [] (smpboot_thread_fn) from [] (kthread+0xdc/0xf0) > [] (kthread) from [] (ret_from_fork+0x14/0x34) > ---[ end trace b57b14a99c1d8812 ]--- > > It comes from the fact that devices can called some code from the DMA > controller with irq disabled. _bh variant is not intended to be used in > this case since it can enable irqs. Switch to irqsave/irqrestore variant to > avoid this situation. Applied, thanks -- ~Vinod -- 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/