From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by ozlabs.org (Postfix) with ESMTP id BD2852C00A2 for ; Mon, 6 Aug 2012 21:57:33 +1000 (EST) From: Arnd Bergmann To: qiang.liu@freescale.com 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 References: <1344249361-10263-1-git-send-email-qiang.liu@freescale.com> In-Reply-To: <1344249361-10263-1-git-send-email-qiang.liu@freescale.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Message-Id: <201208061157.17667.arnd@arndb.de> Cc: vinod.koul@intel.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, Timur Tabi , dan.j.williams@gmail.com, herbert@gondor.hengli.com.au, linux-crypto@vger.kernel.org, dan.j.williams@intel.com, linuxppc-dev@lists.ozlabs.org, davem@davemloft.net List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.