Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753363Ab1D0GAL (ORCPT ); Wed, 27 Apr 2011 02:00:11 -0400 Received: from eu1sys200aog120.obsmtp.com ([207.126.144.149]:53648 "EHLO eu1sys200aog120.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752437Ab1D0GAJ (ORCPT ); Wed, 27 Apr 2011 02:00:09 -0400 Message-ID: <4DB7B0D5.5050504@st.com> Date: Wed, 27 Apr 2011 11:29:49 +0530 From: viresh kumar User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Russell King - ARM Linux , "vinod.koul@intel.com" Cc: "dan.j.williams@intel.com" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Armando VISCONTI , Shiraz HASHIM , amitgoel , "viresh.linux@gmail.com" , "jamie@jamieiles.com" Subject: Re: [PATCH 1/6] dmaengine/dw_dmac: Replace spin_lock_bh with irqsave variants References: <4DAD2AE9.7060106@st.com> <20110426203306.GC17290@n2100.arm.linux.org.uk> In-Reply-To: <20110426203306.GC17290@n2100.arm.linux.org.uk> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1062 Lines: 27 On 04/27/2011 02:03 AM, Russell King - ARM Linux wrote: > On Tue, Apr 19, 2011 at 11:55:45AM +0530, viresh kumar wrote: >> This must have been added in dw_dma_chan instead :( >> Will resend it. > > Even that doesn't work. It has to be a local variable. Hello, There are two kinds of locks taken in dw_dmac: spin_lock_bh and spin_lock. spin_lock_bh is taken from routines called from external drivers and spin_lock taken inside tasklet. For reasons mentioned earlier, spin_lock_bh has to be replaced with spin_lock_irqsave. Now, Is simple spin_lock() sufficient inside tasklet?? As dma API's can be called from interrupt context (which will try to take spin_lock_irqsave). I think spin_lock must be replaced with irqsave variants, even in tasklet. Now if we do that, do we need this tasklet at all?? -- viresh -- 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/