Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1081421ybt; Wed, 1 Jul 2020 18:22:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7pdoQYpgXcFgiZFLbX00bExP1WxlJO4qEw6ZDv2FZdH1e38wIKkRjhSf/uMYOhyQXoyZE X-Received: by 2002:a17:906:76d7:: with SMTP id q23mr24828789ejn.95.1593652962744; Wed, 01 Jul 2020 18:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593652962; cv=none; d=google.com; s=arc-20160816; b=gUBTNOXUOtKaokK+mp6NFzbOwxfpEsJ701aiO9rSaxQ+WarhtZNJOE0otZdUxpc/87 ys6+uW1o7nOkYTjA/t/xYZHQIwaFoGC6e5z+4mTVlqnRbyVbTxU3JdUfOJdM83kt+H7g 0kGVmdsvNxsvo5wIvRf4NQH5ogyFRXkQgsgoBbokqVk6EchFIU2lWXVFpHEW9/Lz0Oua pWne36maQczNHRSfx6SbsiUg7BJdG8uYBwPepaMJZiefAqgXkK/JXfkxmksVxlVdKHwQ 1w2CSNdHrc9ss2tljlJlOFzGqmWPfRZye5S00qzw7iXqrNgOOnbJ4CQyr0yHxY5hCGSm SfCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qEXaeO/RBCE4gxY1zUzUaGeK5kTxbPVf9w68DVQb/Ww=; b=Mycj7OGHUo75+ts5xtX/OZ6SiB6yKDNK8HXYVS2swmn84WtvigIYSfxycv4muZEYsW AOQl3lmosPRhGD8N/RPsfBGSyPdWugTIK6DikAi/m2jFuA/PoEi8nIRvHBN+Y5zDqFjb deqmGQ7mg/JfCqDxytWtwwq3+w3KWesF/iGu0EaswKFCzd0Z46k0geR7lbuY9S8evimh t9GOlBa5aBw2I2YL5YzvbBBXRr+k0e7kB6tYtWZEC4d9teSOunB/pMztZ0Iw7Nf2/Srm i16msodU+H+zywHGwT1tfNBEtjTYL7xcFKzcutaA4dCDMITkY5iIPtgcPVHMHOgrI/zg vlpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qAd8IP2f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si4717000edq.124.2020.07.01.18.22.19; Wed, 01 Jul 2020 18:22:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=default header.b=qAd8IP2f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728088AbgGBBWE (ORCPT + 99 others); Wed, 1 Jul 2020 21:22:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:52992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726028AbgGBBWE (ORCPT ); Wed, 1 Jul 2020 21:22:04 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FA2820748; Thu, 2 Jul 2020 01:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593652924; bh=t48+Xhwq9/p8QGgsPqjcI4Z6WeMmsCy0ku+QepkjvXw=; h=From:To:Cc:Subject:Date:From; b=qAd8IP2f4neblwS824klCsrbfs/Dt0tGiYA40MPNSzrrD1YEtog/X9DE/fAYCJqWi P7A5ZI19v82gLz512OkZlOaODixU1crtq1E07KF2fS3rEBbMvwCe/ac0+g1bJcYwG2 AXhmk0U7jDAVjyCS3eEhsVcDUS9ZKnCjFyjIr1xQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tero Kristo , Santosh Shilimkar , Tony Lindgren , Sasha Levin , linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.7 01/53] soc: ti: omap-prm: use atomic iopoll instead of sleeping one Date: Wed, 1 Jul 2020 21:21:10 -0400 Message-Id: <20200702012202.2700645-1-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tero Kristo [ Upstream commit 98ece19f247159a51003796ede7112fef2df5d7f ] The reset handling APIs for omap-prm can be invoked PM runtime which runs in atomic context. For this to work properly, switch to atomic iopoll version instead of the current which can sleep. Otherwise, this throws a "BUG: scheduling while atomic" warning. Issue is seen rather easily when CONFIG_PREEMPT is enabled. Signed-off-by: Tero Kristo Acked-by: Santosh Shilimkar Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- drivers/soc/ti/omap_prm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index 96c6f777519c0..c9b3f9ebf0bbf 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -256,10 +256,10 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, goto exit; /* wait for the status to be set */ - ret = readl_relaxed_poll_timeout(reset->prm->base + - reset->prm->data->rstst, - v, v & BIT(st_bit), 1, - OMAP_RESET_MAX_WAIT); + ret = readl_relaxed_poll_timeout_atomic(reset->prm->base + + reset->prm->data->rstst, + v, v & BIT(st_bit), 1, + OMAP_RESET_MAX_WAIT); if (ret) pr_err("%s: timedout waiting for %s:%lu\n", __func__, reset->prm->data->name, id); -- 2.25.1