Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1500990rwb; Mon, 7 Nov 2022 02:19:12 -0800 (PST) X-Google-Smtp-Source: AMsMyM7cooRbl64U9WcC8JbMaus1Iq13h3XfI2Gn+UTObpzpSGqEonVYw7B+i+DoN4ny1XFwVUjs X-Received: by 2002:a17:907:6e28:b0:7a0:b6b5:5103 with SMTP id sd40-20020a1709076e2800b007a0b6b55103mr46223341ejc.300.1667816352203; Mon, 07 Nov 2022 02:19:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667816352; cv=none; d=google.com; s=arc-20160816; b=KRdYHa62Ye/n/ss5S28V223F/LXbzbwLYJj2kpzmWfDfiqATj5lC+F8QltO56zdQzm T0/bof9Q+3dGq760bOJGsuCIrsn4j1p/OWSZklNcNp+tXFmQs0KdoF81lgNyN6Dte27U Ht7vFzHfuv6HTMO2hnvQnTCYKHi0yrXFF3fxfguWA6KwsXoUVQd8Fd3FdKxJn+SbUeyA C3eZ/vgttXWs5xSnghsQALwhwC2t4VxEIABT0VAWlu5Z6jV80jWY+wkEu1vWnG48Qwlx nsdgvVXS7pws1wM9EDqPOkKOjKBNttfVPteY2IgOgyo59u1QDOAQ7EnDkC09SlV3g2NY oQ9w== 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=YuV9wgf12ul+9/jfVbKRS+fWcLIoKUl7K9zqYqfF86Q=; b=fVJdWIN0ACI0fE12mn8E/VqqPITb1NQu/1r/m06EVQDE2M3/cSZb7ym04NaRDGe9Rm WNCNaiMJgJaB/Zib9ruYYg0gqY6bjxT6FHlWz8WEwlVMWTEPbLPysG/vw3zobSoRkqMi V4UDkcHxls6Hso2YCNgc14fnAnefkQzeEFCWaG/zauzmdHCOgHfsg2SkjX3ggZmk9iSX AlwKA1CcZnJ5fW4XmCE1ATNAJ+V8Yw0NnnLJHl+QAMVnrnKyxY0j7mqwDxWzfWog2DtN CIgGjg5LfyKUDiMiIT5S3xra/xTasXVXHDRiZO/H1eTBJA2o7C3GzQNHAx9Fu9teFE/a lOww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lwhSIemp; 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 gb28-20020a170907961c00b007707b853e46si8363058ejc.882.2022.11.07.02.18.29; Mon, 07 Nov 2022 02:19:12 -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=lwhSIemp; 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 S231482AbiKGJjx (ORCPT + 95 others); Mon, 7 Nov 2022 04:39:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231849AbiKGJjh (ORCPT ); Mon, 7 Nov 2022 04:39:37 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40B0E18359 for ; Mon, 7 Nov 2022 01:39:33 -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 dfw.source.kernel.org (Postfix) with ESMTPS id D0EE560FA0 for ; Mon, 7 Nov 2022 09:39:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A71FC433C1; Mon, 7 Nov 2022 09:39:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667813972; bh=spbjsj6d/mh2WdTsuolIPPVMJv8lUrjlgNBp9SHvitw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lwhSIempCsTnTfOAjRtrMqCpwbJYRsZSqdIClAKuLcKMRIl2vDWN6wbHbIGwULGcz gvpw1zLBYsvR8paBpSu7IKnRtBc7DtCkJH9kwzU8DzETj1eAPhkEZbvcDHF+HWLF4b 6gWMgap0xH3JQMqx//YixgOSLEkUrF4HWBxnrW7W9Jl0a1SKg3AvXYw7XsqE7bZ0ni QbnH52a3fe4rDOTZnKnTysN2udMnK5BiIEQBD4NopVZFeN7Lb7sSHkH3JnvVixhOeI oIGXvSoUVOI3qSXUPG8ZJ8lh8wAQuWfoQ90yg882VNLsI9UETJwyRcq4Z4KaFI/ASI tOviXTILlHrbw== Date: Mon, 7 Nov 2022 09:39:26 +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/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? -- Lee Jones [李琼斯]