From patchwork Wed Mar 7 18:09:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 145327 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2516DB6EEA for ; Thu, 8 Mar 2012 05:12:11 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1S5LIq-0003SM-Fm; Wed, 07 Mar 2012 18:09:32 +0000 Received: from mail-bk0-f49.google.com ([209.85.214.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1S5LIm-0003S8-S2 for linux-arm-kernel@lists.infradead.org; Wed, 07 Mar 2012 18:09:30 +0000 Received: by bkcjk13 with SMTP id jk13so7462632bkc.36 for ; Wed, 07 Mar 2012 10:09:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=N4zdq19saS5QR2gVF14v3BJB7N6s6GoH6lCkoq1cWpo=; b=vdcMaDwoz49rvFo45zw/N5ZXnuU8+6HWjNJeZf99xiW+zAgYsslG2nRZVai+tg6Fmw MVzO1q1YTVOwbzlAMsD5MZm08Fhzr5HWwJmApmgRIUPuqnX+Oq+9wnvCfp/9MWZMEJBd fPuRhYBMXO7O6B7Ut7/npw/hWLU6lSiD6gMZzlRL8I+JMl8xpfVj1Pt4A/S/YIar5n1K s7ucZUkfh5BDn/D/vffaCl57iLXQS3YoCpNvYRbLP5DUyuE4ipYpT/+r8Lo3rl4JNiKB rjf+whqSbiHEe5LvV8yUtYWASIlOCADw2KCXebjHD5D4y84A7CrOQWgu9jAfTyxLu+fi BJwg== MIME-Version: 1.0 Received: by 10.204.130.204 with SMTP id u12mr1341652bks.49.1331143765290; Wed, 07 Mar 2012 10:09:25 -0800 (PST) Received: by 10.204.164.197 with HTTP; Wed, 7 Mar 2012 10:09:25 -0800 (PST) In-Reply-To: <20120306223321.GD15201@n2100.arm.linux.org.uk> References: <20120306223321.GD15201@n2100.arm.linux.org.uk> Date: Wed, 7 Mar 2012 23:39:25 +0530 Message-ID: Subject: Re: [PATCH v2 0/9] DMA engine cookie handling cleanups From: Jassi Brar To: Russell King - ARM Linux X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jassisinghbrar[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Stephen Warren , Linus Walleij , Srinidhi Kasagar , Vinod Koul , Barry Song , Dan Williams , Li Yang , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On Wed, Mar 7, 2012 at 4:03 AM, Russell King - ARM Linux wrote: > [v2 - more or less same description.  Including lakml in cc for the full > set] > > This patch series cleans up the handling of cookies in DMA engine drivers. > This is done by providing a set of inline library functions for common > tasks: > > - moving the 'last completed cookie' into struct dma_chan - everyone >  has this in their driver private channel data structure > > - consolidate allocation of cookies to DMA descriptors > > - common way to update 'last completed cookie' value > > - standard way to implement tx_status callback and update the residue > > - consolidate initialization of cookies > > - update implementations differing from the majority of DMA engine drivers >  to behave the same as the majority implementation in respect of cookies > > What this means is that we get to the point where all DMA engine drivers > will hand out cookie value '2' as the first, and incrementing cookie > values up to INT_MAX, returning to cookie '1' as the next cookie. > > Think of this patch series as round 1...  I am hoping over time that more > code can be consolidated between the DMA engine drivers and end up with a > consistent way to handle various common themes in DMA engine hardware > (like physical channel<->peripheral request signal selection.) > Compilation is broken without the following minor fix. After that you may add Acked-by: Jassi Brar Thanks. diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 49c123f..abf35a3 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -339,7 +339,6 @@ static int pl330_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, unsigned /* Mark all desc done */ list_for_each_entry_safe(desc, _dt, &pch->work_list , node) { desc->status = DONE; - pch->completed = desc->txd.cookie; list_move_tail(&desc->node, &list); }