From: Arnd Bergmann Subject: Re: [PATCH v6 6/8] fsl-dma: use spin_lock_bh to instead of spin_lock_irqsave Date: Mon, 6 Aug 2012 11:57:17 +0000 Message-ID: <201208061157.17667.arnd@arndb.de> References: <1344249361-10263-1-git-send-email-qiang.liu@freescale.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Cc: linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, dan.j.williams@intel.com, linux-kernel@vger.kernel.org, dan.j.williams@gmail.com, vinod.koul@intel.com, kim.phillips@freescale.com, herbert@gondor.hengli.com.au, davem@davemloft.net, gregkh@linuxfoundation.org, Li Yang , Timur Tabi To: qiang.liu@freescale.com Return-path: Received: from moutng.kundenserver.de ([212.227.126.171]:63001 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756006Ab2HFL5m (ORCPT ); Mon, 6 Aug 2012 07:57:42 -0400 In-Reply-To: <1344249361-10263-1-git-send-email-qiang.liu@freescale.com> Sender: linux-crypto-owner@vger.kernel.org List-ID: On Monday 06 August 2012, qiang.liu@freescale.com wrote: > > From: Qiang Liu > > The use of spin_lock_irqsave() is a stronger locking mechanism than is > required throughout the driver. The minimum locking required should be > used instead. Interrupts will be turned off and context will be saved, > there is needless to use irqsave. > > Change all instances of spin_lock_irqsave() to spin_lock_bh(). > All manipulation of protected fields is done using tasklet context or > weaker, which makes spin_lock_bh() the correct choice. > > Cc: Dan Williams > Cc: Dan Williams > Cc: Vinod Koul > Cc: Li Yang > Cc: Timur Tabi > Signed-off-by: Qiang Liu > Acked-by: Ira W. Snyder Acked-by: Arnd Bergmann You could actually change the use of spin_lock_bh inside of the tasklet function (dma_do_tasklet) do just spin_lock(), because softirqs are already disabled there, but your version is also ok.