Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932445Ab2HGCqM (ORCPT ); Mon, 6 Aug 2012 22:46:12 -0400 Received: from co1ehsobe002.messaging.microsoft.com ([216.32.180.185]:3925 "EHLO co1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753999Ab2HGCqK convert rfc822-to-8bit (ORCPT ); Mon, 6 Aug 2012 22:46:10 -0400 X-Forefront-Antispam-Report: CIP:70.37.183.190;KIP:(null);UIP:(null);IPV:NLI;H:mail.freescale.net;RD:none;EFVD:NLI X-SpamScore: -13 X-BigFish: VS-13(zz98dI9371I542M1432I11f6Nzz1202hzz8275bhz2dh2a8h668h839h8e2h8e3h944hd25hf0ah107ahbe9i) From: Liu Qiang-B32616 To: Arnd Bergmann 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" , Phillips Kim-R1AAHA , "herbert@gondor.hengli.com.au" , "davem@davemloft.net" , "gregkh@linuxfoundation.org" , Li Yang-R58472 , Tabi Timur-B04825 Subject: RE: [PATCH v6 6/8] fsl-dma: use spin_lock_bh to instead of spin_lock_irqsave Thread-Topic: [PATCH v6 6/8] fsl-dma: use spin_lock_bh to instead of spin_lock_irqsave Thread-Index: AQHNc8LtMyyKGbodvEy0WKjsKQrKbJdNAYuAgACilsA= Date: Tue, 7 Aug 2012 02:45:45 +0000 Message-ID: References: <1344249361-10263-1-git-send-email-qiang.liu@freescale.com> <201208061157.17667.arnd@arndb.de> In-Reply-To: <201208061157.17667.arnd@arndb.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.192.208.94] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2010 Lines: 47 > -----Original Message----- > From: Arnd Bergmann [mailto:arnd@arndb.de] > Sent: Monday, August 06, 2012 7:57 PM > To: Liu Qiang-B32616 > 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; Phillips Kim-R1AAHA; > herbert@gondor.hengli.com.au; davem@davemloft.net; > gregkh@linuxfoundation.org; Li Yang-R58472; Tabi Timur-B04825 > Subject: Re: [PATCH v6 6/8] fsl-dma: use spin_lock_bh to instead of > spin_lock_irqsave > > 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. Yes, you are right, it will disable softirq. Thank you very much. -- 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/