From patchwork Wed Apr 23 19:52:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 4044501 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9B4EE9F1F4 for ; Wed, 23 Apr 2014 19:52:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CEEDF2028D for ; Wed, 23 Apr 2014 19:52:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0176E2021F for ; Wed, 23 Apr 2014 19:52:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757375AbaDWTw1 (ORCPT ); Wed, 23 Apr 2014 15:52:27 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:32802 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754331AbaDWTw1 (ORCPT ); Wed, 23 Apr 2014 15:52:27 -0400 Received: by mail-lb0-f169.google.com with SMTP id n15so1226820lbi.0 for ; Wed, 23 Apr 2014 12:52:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hVk7ZHxjtWQLk7HPvLGGweTsNW4fEfxJJjDd37vTdTg=; b=SySRl/mvXojHcIObsZT0Ys+uh1Ftqeh/yJkflkCWvz4alXTkwoQOy9pN3BMYyHzg4H /c5hZe3CdQk3M1gcNTxFpfPAMBvAC3ba5WfWAx1BQPg1QNMB7R4/hI6cHR2jM0btlCsh 6h6M2AZ6zOgUBUZeTjNLIgNHC2WO1wvHGx96AvXS1n6J85s+4E/GOb5x7fYW5vyjhwtP HxVrBcYbWhtCG0JUmTpr1+ugDn4i1PqKfYxA2k2fkV8ficy2CM92HztLmvd4wg5ITAof qHKWnaCXQ5m5CNKGR4TSjk+OFdOzpiAwj0XvitU1TC7OCXzyscPCTKwsYtovDoI3UTvg zoFA== X-Gm-Message-State: ALoCoQn8xohAH9KHcUPDWrPieMFjV7er2ECHBF/h5ABEmNfssjnrx/6KTHX5vuJWMcQa09TErx9W X-Received: by 10.112.159.104 with SMTP id xb8mr32690548lbb.31.1398282745578; Wed, 23 Apr 2014 12:52:25 -0700 (PDT) Received: from linaro-ulf.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id zx3sm2038678lbc.2.2014.04.23.12.52.23 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 12:52:24 -0700 (PDT) From: Ulf Hansson To: Vinod Koul , Dan Williams , Linus Walleij , linux-arm-kernel@lists.infradead.org Cc: dmaengine@vger.kernel.org, Ulf Hansson Subject: [PATCH 1/4] dma: ste_dma40: Maintain spinlock order while handling pause Date: Wed, 23 Apr 2014 21:52:01 +0200 Message-Id: <1398282724-2607-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The runtime PM resume callback needs to be executed while holding the spinlock, make sure to maintain this for the pause operation as well. Signed-off-by: Ulf Hansson Acked-by: Linus Walleij --- drivers/dma/ste_dma40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index bf18c78..6e97cf6 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -1495,8 +1495,8 @@ static int d40_pause(struct d40_chan *d40c) if (!d40c->busy) return 0; - pm_runtime_get_sync(d40c->base->dev); spin_lock_irqsave(&d40c->lock, flags); + pm_runtime_get_sync(d40c->base->dev); res = d40_channel_execute_command(d40c, D40_DMA_SUSPEND_REQ);