From mboxrd@z Thu Jan 1 00:00:00 1970 From: vinod.koul@intel.com (Vinod Koul) Date: Mon, 8 Jun 2015 16:30:52 +0530 Subject: [PATCH v2 1/3] dmaengine: at_xdmac: lock fixes In-Reply-To: <1433752399-26231-1-git-send-email-ludovic.desroches@atmel.com> References: <1433751820-26142-1-git-send-email-ludovic.desroches@atmel.com> <1433752399-26231-1-git-send-email-ludovic.desroches@atmel.com> Message-ID: <20150608110052.GG28601@localhost> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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