From patchwork Tue Aug 10 17:28:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 494367 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp4190634jap; Tue, 10 Aug 2021 10:55:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJtSeZSf0gbV8knR0dMskHmrQXkP6h0aD37aS8r0wUupIxU68XySCYZ9HM3PcDuEKCUhsz X-Received: by 2002:a17:906:4f03:: with SMTP id t3mr8841188eju.369.1628618156693; Tue, 10 Aug 2021 10:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628618156; cv=none; d=google.com; s=arc-20160816; b=Z4leul2PMypecnLDkWlOFI5Q2wAuciA6nA5raJem1vjmyX7Pdd48+MkD6nQBXPIK6U qSC8hR/bWwIORHIqslIrtTh9Z+MPD+0s+rsBJjXqGlcLLxLDZsCrVxxl4zuQdgZjSLo8 iah2nPClpU8Lv20ZB6Dt1CEMwn3brWlzGFYXpw6+Yi/6fNlEC5o9t50Kn9R832hDNdIA BRONC3q2LCrqsFRpDuVhIDzSpUTVjSKdqrsPIQdGJjqKyvxawROh1YQqAmTtcXCOnXxV 8tG8o0odMQkfiFMP8Gme83m1W8ckb2jK4p52cURfJdKp1p08WOSBSQVsJfN2ExIhANMM C04g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Fu+FZiJOqvw2zfp5lDAqXHz7EaRH9cx99hHUxwKHk78=; b=INSMLyk8zk99K2+lfsZA+/G8Tii21Auvxw64R/DVbEhsXMKyJ4Xielqo4cJWJ2FELP NJ06jZjRYudnzvpKLjGUyLL3xnVwAmxMmeHIzT6U0qr5z5fhOnfNRxXn1xfiltC1WH+F Etlx7FjhcFIbe4uxrY1/fhvG/QjkW0g54gqUAJ4zFbQsxyJffKFWdCSf8mMij1O+r7C0 vgR/7a4dPPRbdP4i+6a6rA7juSpMGqPXjg/XZMZV6fbXv1Cc9wo4pYLqxvHJYYjDUZbs MDNZaCrvzQyd/QAmbvgBArZ9bOdpI0QPKdYXNoN/NpKfKlE2d7yNq+7QYhqRkHh9alFA JYMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lOGVytGd; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs3si22191073ejc.368.2021.08.10.10.55.56; Tue, 10 Aug 2021 10:55:56 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lOGVytGd; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232246AbhHJR4K (ORCPT + 12 others); Tue, 10 Aug 2021 13:56:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:52288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236665AbhHJRxO (ORCPT ); Tue, 10 Aug 2021 13:53:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7B0E2603E7; Tue, 10 Aug 2021 17:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617429; bh=j1a6Z+n+QRy7CFaUYhg8hxITUPRiaBKuXeJkfzOuPSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lOGVytGdKZnlKLeFVuwLVUAboKd+Vs3AQjeddAgaMDFP9zOvglr1FZeJqttXmfJ75 HOiOtObPMfUywvNv9Zc+pQyo8Y+hfsq4Oud1c+/c+aJk3TG90iXT7PdcbF3RH+D709 fPwq4/AIw9piwizjzFcx4lEobVSUzV6+Y2a5l9x4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Kunihiko Hayashi , Vinod Koul , Sasha Levin Subject: [PATCH 5.13 027/175] dmaengine: uniphier-xdmac: Use readl_poll_timeout_atomic() in atomic state Date: Tue, 10 Aug 2021 19:28:55 +0200 Message-Id: <20210810173001.853221605@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810173000.928681411@linuxfoundation.org> References: <20210810173000.928681411@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Kunihiko Hayashi [ Upstream commit 55f24c27b6c1a840b62fe297616f1f9ea3576cb7 ] The function uniphier_xdmac_chan_stop() is only called in atomic state. Should use readl_poll_timeout_atomic() there instead of readl_poll_timeout(). Reported-by: Dan Carpenter Fixes: 667b9251440b ("dmaengine: uniphier-xdmac: Add UniPhier external DMA controller driver") Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/1627364852-28432-1-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/uniphier-xdmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.30.2 diff --git a/drivers/dma/uniphier-xdmac.c b/drivers/dma/uniphier-xdmac.c index 16b19654873d..d6b8a202474f 100644 --- a/drivers/dma/uniphier-xdmac.c +++ b/drivers/dma/uniphier-xdmac.c @@ -209,8 +209,8 @@ static int uniphier_xdmac_chan_stop(struct uniphier_xdmac_chan *xc) writel(0, xc->reg_ch_base + XDMAC_TSS); /* wait until transfer is stopped */ - return readl_poll_timeout(xc->reg_ch_base + XDMAC_STAT, val, - !(val & XDMAC_STAT_TENF), 100, 1000); + return readl_poll_timeout_atomic(xc->reg_ch_base + XDMAC_STAT, val, + !(val & XDMAC_STAT_TENF), 100, 1000); } /* xc->vc.lock must be held by caller */