Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756080Ab2HFL5o (ORCPT ); Mon, 6 Aug 2012 07:57:44 -0400 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 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 User-Agent: KMail/1.12.2 (Linux/3.5.0; KDE/4.3.2; x86_64; ; ) 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 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" Content-Transfer-Encoding: 7bit Message-Id: <201208061157.17667.arnd@arndb.de> X-Provags-ID: V02:K0:R5AdbjTpjqRd6K+wXX7CKw05obfApn+6vpnVFxZOjaP g8NwIgTkQVHApm5adOQaK8UsCwOSNdYle0RBbySFCXWDdz1zD8 KY3r1DuemF4OUGrfBOn7fjuGyK4ZCWSlTUSdIiGJLasujxBz3+ VRJxV1iGJvocpaK/yjQWeRQV/y4YiTOLOPpJOoTXo9XV5DbHgm MV9LfL+feoH4fPAd1fn0aUPM7y8xaLIqiEOVr9UnatXh1lokWA 5TsBHng6yQIX7nQsrvjjUrINlKLwPOhQtxY3yCtKeHEC/6rac2 G71T7r4vPDHef4iiQcMQhPYFD/Mnt0BXc2m8nltg52ABofRrhT BOsbFmtubjSQpeaiAG88= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1351 Lines: 31 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. -- 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/