From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755369AbbI2Gay (ORCPT ); Tue, 29 Sep 2015 02:30:54 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:33926 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753740AbbI2Gap (ORCPT ); Tue, 29 Sep 2015 02:30:45 -0400 Reply-To: alex.popov@linux.com Subject: Re: [PATCH v3 1/3] powerpc/512x: add LocalPlus Bus FIFO device driver References: <1443115737-3948-1-git-send-email-alex.popov@linux.com> <1443115737-3948-2-git-send-email-alex.popov@linux.com> <56049CD0.7080104@tabi.org> <56093CE5.5070301@linux.com> <56093E1D.4080008@tabi.org> To: Timur Tabi , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Anatolij Gustschin , Rob Herring , Grant Likely , Dan Williams , Vinod Koul , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linuxppc-dev@lists.ozlabs.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Popov From: Alexander Popov X-Enigmail-Draft-Status: N1110 Message-ID: <560A30DF.9050900@linux.com> Date: Tue, 29 Sep 2015 09:34:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <56093E1D.4080008@tabi.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.09.2015 16:18, Timur Tabi wrote: > Alexander Popov wrote: >> The only question I have: why calling dma_unmap_single() from within >> a spinlock is a bad practice? > > I don't know, but usually functions that allocate or free memory cannot be > called from within a spinlock. You need to check that. Since the MPC5121 > is a single-core CPU, you might not notice if you're doing something wrong. I've double-checked the code and LDD and don't see any reason to avoid calling dma_unmap_single() from interrupt context and within spinlock. Please correct me if I'm wrong. Thanks. Best regards, Alexander