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: 28934 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 70DFB203AC for ; Wed, 23 Apr 2014 19:52:28 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id l13sf42243iga.7 for ; Wed, 23 Apr 2014 12:52:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=hVk7ZHxjtWQLk7HPvLGGweTsNW4fEfxJJjDd37vTdTg=; b=nOWDLm6tZY4ngWwy13ycAdB1bxQYBBTGzr8pCKaWL5adVY0exIcCbksUvXJMpA0m3w c0fkZuU7G0S5vS8CYQZq7jkpgwTTtmERWw8MtFXCg/bIKDO1X2DLW8DGdhvdZIfxW7CE SN3WUB+GGjFc6s2xH9wchSRhjWcONTm5JqL903nFxxsuoRZTxXjhnGfQuzeuTvLbdGE0 MuMvYsgygMGZiZorMlTAqoCOVFLNl2tQUHDKXt9x8XVKj++9MplWMqcI802puhYc7EBL YKfoHTaXKEbR0VmS3kTFpjeVfsd2spWYOt+KRGsMjFRW2wMsZgOTRccyyaW6Vz+byzZI hIkQ== X-Gm-Message-State: ALoCoQkM4eYlRvXO5JqUoJ6k4dEZbzVREuujpd4kizaaqFUpJRl+qH2P0w9yADnRQbV6MVMP9G0Y X-Received: by 10.182.22.133 with SMTP id d5mr27764393obf.27.1398282747921; Wed, 23 Apr 2014 12:52:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.42 with SMTP id g39ls788955qgd.25.gmail; Wed, 23 Apr 2014 12:52:27 -0700 (PDT) X-Received: by 10.58.94.135 with SMTP id dc7mr87333veb.66.1398282747782; Wed, 23 Apr 2014 12:52:27 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id y5si343444vcq.192.2014.04.23.12.52.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 12:52:27 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so1729190veb.6 for ; Wed, 23 Apr 2014 12:52:27 -0700 (PDT) X-Received: by 10.52.51.197 with SMTP id m5mr37184955vdo.9.1398282747717; Wed, 23 Apr 2014 12:52:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp129005vcb; Wed, 23 Apr 2014 12:52:27 -0700 (PDT) X-Received: by 10.152.42.164 with SMTP id p4mr36947690lal.5.1398282746735; Wed, 23 Apr 2014 12:52:26 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) by mx.google.com with ESMTPS id zv8si1451613lbb.83.2014.04.23.12.52.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 12:52:26 -0700 (PDT) Received-SPF: none (google.com: ulf.hansson@linaro.org does not designate permitted sender hosts) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id n15so1234743lbi.28 for ; Wed, 23 Apr 2014 12:52:25 -0700 (PDT) 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 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);