Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5345373rwb; Mon, 14 Nov 2022 03:18:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf6zc8bLSDsl5ck8thOogzm4z91IRd5Xgr+IAiPv3r5o6M/kN1a79QK2k32KneoDAfWnNsVO X-Received: by 2002:a17:906:c284:b0:7a1:6786:444f with SMTP id r4-20020a170906c28400b007a16786444fmr9817983ejz.409.1668424708135; Mon, 14 Nov 2022 03:18:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668424708; cv=none; d=google.com; s=arc-20160816; b=BIC25AkK57ZIwV86dt+vI3NGjk7fqRCdFj+37Moje4DXoqppVooqTQlBD1dL89IGLu TZZtoPurbVRb/60w/3rbxguwgLIYuqLFvlZUvApQXrks6VnX6vRrbxaJKLbd1eeTmIcs oY03b5wfszWRnuImTgsE2tukbvkv4y5TXskeK+97K98ygKhogT4jj8B9q1TOZt/F4JiW YwYLtfffwec8osj/WYr5GHFngqCkdDHCKlYJe3LXZ2uKKIShT68Mqm5MSYiAp95UcYNP tKj/ZrOJGQtgnYKFSO7MgpK7n8T9IsHzkwXT7z19EySPtC4Q+JnYGlnVcFND/ZeNXZP0 IwnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KoZQSHQDrBMJDz9hSVbo/kvzcLbf8IgV0xaCzPOOb7g=; b=aearjbogz1mSqb7SXcXv4a77U23/P0RaOMa0b0k8sX/gc9Bbj/VidHMRGFpNt+QljE wlAId8H9HIBoswX2LR7GLk6NekqKU5ybiSpTChhUzvr2C3lozuux+UwZ+Eh9kAw7rwAZ Bcd1PhXip6DQsa1aLUQFefgnKNVTYFTd6sh3CrexIIVWh0sLWJ2L/EO7714W8eF3ttWc +CJArHVDAAUAXnzWCmKEBHeIwBH2D0vfhMmBRGljcvjH8q7TRcmiS3Q7PVfVNqvVFgQr Y1sY6dhU4AVR7wFtbZ23ySThviAtqW5O5WAIRhcRGBMq1XmKyVgF2U6HouAqf+Fsh8TY Eo3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cZnL7S0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb23-20020a1709071c9700b0073d9c412570si9843652ejc.785.2022.11.14.03.18.05; Mon, 14 Nov 2022 03:18:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cZnL7S0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236491AbiKNLDO (ORCPT + 89 others); Mon, 14 Nov 2022 06:03:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236432AbiKNLDN (ORCPT ); Mon, 14 Nov 2022 06:03:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FAFB1EAE3 for ; Mon, 14 Nov 2022 03:03:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 385B9B80DE9 for ; Mon, 14 Nov 2022 11:03:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BB47C433D6; Mon, 14 Nov 2022 11:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668423789; bh=We0tNznk6pD1EsYDV5SF5sB9KstEhBcQ5VVI9l4wVjs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cZnL7S0RSLGTUOgQ+xI675KTj8CHtInFBWJ6ZmcJJlq6pC4fbmhuoIwiXJafRZEN2 j1auOba7pk/CQM5dYeCxvawq8db4ZmHhLZf1XtyLsd46tPxzZ0KqXEyoSeiR1aDAyt ew1xMjuGZERQpUfmCQsbRvOhLQ2l/g6KMet1v46j/uLQvOD4pe5zAZeD57q3GGQATM D6ePOh7LTncRVz0rzDcMX2FBO+6Wr7R5ZyUz9IOBuc0oCNr92FUvSQ6h0TSbCezwAx izoY7/BO6H17+EO/OH9B3KsSc2HFmZeWrH5WCBdjietkxLGbkKCMjEZGsvecO7jgGO ZgFxkvFx9BptQ== Date: Mon, 14 Nov 2022 11:03:05 +0000 From: Lee Jones To: Dmitry Osipenko Cc: Samuel Holland , Chen-Yu Tsai , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , "Rafael J. Wysocki" , "Russell King (Oracle)" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mfd: axp20x: Do not sleep in the power off handler Message-ID: References: <20221105212909.6526-1-samuel@sholland.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 07 Nov 2022, Dmitry Osipenko wrote: > On 11/7/22 12:39, Lee Jones wrote: > > On Mon, 07 Nov 2022, Dmitry Osipenko wrote: > > > >> On 11/6/22 00:29, Samuel Holland wrote: > >>> Since commit 856c288b0039 ("ARM: Use do_kernel_power_off()"), the > >>> function axp20x_power_off() now runs inside a RCU read-side critical > >>> section, so it is not allowed to call msleep(). Use mdelay() instead. > >>> > >>> Fixes: 856c288b0039 ("ARM: Use do_kernel_power_off()") > >>> Signed-off-by: Samuel Holland > >>> --- > >>> > >>> drivers/mfd/axp20x.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c > >>> index 88a212a8168c..880c41fa7021 100644 > >>> --- a/drivers/mfd/axp20x.c > >>> +++ b/drivers/mfd/axp20x.c > >>> @@ -842,7 +842,7 @@ static void axp20x_power_off(void) > >>> AXP20X_OFF); > >>> > >>> /* Give capacitors etc. time to drain to avoid kernel panic msg. */ > >>> - msleep(500); > >>> + mdelay(500); > >>> } > >>> > >>> int axp20x_match_device(struct axp20x_dev *axp20x) > >> > >> ARM was doing local_irq_disable() on power-off before > >> do_kernel_power_off() was introduced, so this should've been incorrect > >> for a couple years at least. If I'm not missing anything. > > > > Is that a review? Care to provide a tag? > > It's a review and my point was that the "Fixes" tag in this patch > doesn't look correct. But this is minor comment, otherwise patch looks > okay. Hope that the relevant I2C controller driver supports atomic > transfer that are required for power-off to work. > > Reviewed-by: Dmitry Osipenko Thanks. -- Lee Jones [李琼斯]