Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp861115rwb; Sun, 6 Nov 2022 15:14:51 -0800 (PST) X-Google-Smtp-Source: AMsMyM6xNWWvA89HOVOmi68EaNZMuEvqoBpzSTl66OOlVnJVX39c/pjI6vZtHDkJ9K0V4QxXQJd1 X-Received: by 2002:a17:90a:b8f:b0:213:c985:b5e5 with SMTP id 15-20020a17090a0b8f00b00213c985b5e5mr43753230pjr.57.1667776491024; Sun, 06 Nov 2022 15:14:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667776491; cv=none; d=google.com; s=arc-20160816; b=euRhzMyohzGKDcCkNb4Ulm5dVvsdyU46CDw1zyU/gTwH84pjR80r2tiLiPIwiNu3hw BFJw0YJ8cWUzLhuiMpaR6cnUXGm8eGfVqK7TMP0RZ/NNLhjpdJMMWgnSavAP01DvToK9 68rN5Z3dSMtGjiBCMqIJSjPuO1BuNpZF6QUEEtfnL/V6oo91wwYvLXOGLTJBQ62MxVu8 zXiULgOgakvkKbMhnfBhCPz5xg75KGg9lBQV+4sVlBfyXQlfS5dGxmVjJ8dIjITxoXEF 5hEStOCdwy316+nWBmJQdHWWxGE7rGxV17Mg79wfuWCE8l2tuABLT/PjL/1HyLvdR+Ba n88w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=BgJO2z1HSyt5mACTgGzTD620h33JKgDideduDBv5wl0=; b=ujt/eHcCYL0ZUxzUr9RtIfMLSHrIJwtCmOUWrIDwWdFxNMmuD9XHrBJz93OogTEeMu CMh7YCJEDzB3gC2FSPqwtQrFn/7jat8TpKk1soryEmMCP88bGm36FluUmv5z2hHHiEDl mCYZVLj+HKSAxhCJRBNEbn9NDfyzEih8WpKj+mH6ZiFouAczINyrSnVt4DVj5PV5/w/3 abNKA8Alt8ZkNtcye/mnmisgfKi2TmCuGAEVIMDGqBr1JZ/WjNSPvlzUMrLVS5MoVgaE IFaSVZB3W5oVf51MLlJE6bMzBOeem+h4bAtrWPvkfNFXsTDEWOt+gXx7fXWbBQRt3K3p KOkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=i8kh9jqr; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a170903228b00b00175393589d6si10075684plh.205.2022.11.06.15.14.37; Sun, 06 Nov 2022 15:14:50 -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=@collabora.com header.s=mail header.b=i8kh9jqr; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230079AbiKFWkY (ORCPT + 95 others); Sun, 6 Nov 2022 17:40:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbiKFWkW (ORCPT ); Sun, 6 Nov 2022 17:40:22 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70A98FCEF for ; Sun, 6 Nov 2022 14:40:21 -0800 (PST) Received: from [192.168.2.238] (109-252-117-140.nat.spd-mgts.ru [109.252.117.140]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id 83F5E660226C; Sun, 6 Nov 2022 22:40:19 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1667774420; bh=vGvc+fYcEwH0rnVPheWtDPFDXmkIouczct+CWphMwgM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=i8kh9jqrJlCBWDBeB8KDH0OiMaJonI2OgHb4CHJqVlW+qRnFQrDK22dFC0oaK8ulJ tdVcKj2lk/KpJJ9rUTIsoDy+/EPCmRjKGmkNlhRG9dFLapaZIdaF09MsM+m0uR7RN2 mpmYAzxMxn//a5GxyPvbZ7vc0aWTgN002cHIm+aJRumucLaVdZtilD6vceRq0FL+// +8lOjD4GgrGSqq519WvuumfPuwENfa0fUoYYQO0GtkESIi4EVzq/1bbdnG/G8iRavc RpLrOrthujsC/gVLbWCxcZDlGyN5cnc6pf8If2MT3bdVBUDCqil3b9OXA1UFJbT7I5 k+1kF/MsuEYqA== Message-ID: Date: Mon, 7 Nov 2022 01:40:17 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] mfd: axp20x: Do not sleep in the power off handler Content-Language: en-US To: Samuel Holland , Chen-Yu Tsai , Lee Jones Cc: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , "Rafael J. Wysocki" , "Russell King (Oracle)" , linux-kernel@vger.kernel.org References: <20221105212909.6526-1-samuel@sholland.org> From: Dmitry Osipenko In-Reply-To: <20221105212909.6526-1-samuel@sholland.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 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. -- Best regards, Dmitry