From patchwork Sat Nov 5 21:29:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 16036 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1182228wru; Sat, 5 Nov 2022 14:35:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4BfCYPSA2xMBbw/U5Ja/lCCes2YX1HPerf2ffCuVKbtuVmkM2EFYb+V5VQu3Sd4m5hLIIm X-Received: by 2002:a17:90a:24b:b0:213:9da2:5c98 with SMTP id t11-20020a17090a024b00b002139da25c98mr43570160pje.123.1667684144402; Sat, 05 Nov 2022 14:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667684144; cv=none; d=google.com; s=arc-20160816; b=pVXY2tBosHNctrI8IU3P9MzIg0JrWrB55J6CiN6XAxmMr87zppAjQY5a49GcdvcXk3 4GCQRgQLhU/aVfnlohAHwRtiyQniTSR02/lUETcfrleKEwd9+lo5cCdqPA4PklAxr0Aw pzg1n7K371bvk2A2Kksd57NrM2HbMqP7sk/tj1X9T1DwAI9j375xAPHq4BCPxRy9OwB1 DSPHleabIpe/nHEZrRZIp/qi6Mxwsv8Rc6yxrRPw2XeGrp/zA1nLLtY9cAqQjKWefiso U1xbjBHmZQcipkuy8lWTIO8zlBGdGQ2icuL3I7kLPeBssKPcil98MDowqVLuCr3elkUt z+vA== 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 :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=1YxFOzKLb6PepEnje/cpfRYVJj5s6XwpPGi9iTAPYdA=; b=aaYW+LyYIFuBy2LYuVqsB7kJRus09sA0s/B4zF0EuOV5NvreatOjicYPJJ9Zg2LNWS CnUNueZN4S3tmU8Gzu/JmvYS+OsWJcP2zjv1KK/x+494VKX2IvLZmC6uATw1VmekZXZC sHTs8JoUUSYSv5EbJDz4l1/G7xrZ5BP29z8Qd3N2WnSP70e0pqhzxaKJRdVa69cmLSJe /cTvHVmifpAVpf07ljxti9HaLvqzKfBl8IojIeaeNqUWCF8F4MyteKsDRRBVtlViyZ/8 ik7Q4i2ibxrXON2wWACm+tnDd9TsneWBqmRHtlfqUGr5aqfbTr180zeMDxxEPC8yEzb9 +XhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=CAGtbpfM; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=shtJ+RRf; 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=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020a170903244a00b00187204b35besi5095796pls.203.2022.11.05.14.35.21; Sat, 05 Nov 2022 14:35:44 -0700 (PDT) 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=@sholland.org header.s=fm1 header.b=CAGtbpfM; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=shtJ+RRf; 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=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiKEV3S (ORCPT + 99 others); Sat, 5 Nov 2022 17:29:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbiKEV3R (ORCPT ); Sat, 5 Nov 2022 17:29:17 -0400 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E43FB9FE7 for ; Sat, 5 Nov 2022 14:29:15 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 4FB0532002E2; Sat, 5 Nov 2022 17:29:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 05 Nov 2022 17:29:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1667683751; x=1667770151; bh=1YxFOzKLb6PepEnje/cpfRYVJ j5s6XwpPGi9iTAPYdA=; b=CAGtbpfMa3ugNCnmNOq0OWGFMJzHOE+lVZ+A1Awxa EvXKKdKXjZ5X9F1WHzw7rBjFo55TJWON1syXXAz8lvEJ9un+YiTQO9IBEUOBwVvL 5nrTrpSfXLXbo04Q4cLPETofWnHkGokp+CC8jvlvzi3X3AJmbeiVowOZ5Fujtb2/ YOKzzOoltrbox4ECOrD9mVfFmEI9D6kW/PCxbeueyv18cyPdxgkfWtx9cyoQcv2O 6V4xixQoxMNRmnQMyWHJ+BThwaxOmHSqkM85rEpDKDl0ViV3e8KOsOgbZRRMekec m6bsRs3KytT6oC28YfQH6ubgzwKOk8B9gP+FQrnzBzo+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1667683751; x=1667770151; bh=1YxFOzKLb6PepEnje/cpfRYVJj5s6XwpPGi 9iTAPYdA=; b=shtJ+RRfCOZ4O8r1bhHrbDAOVM7IHZaZGuxr7XGdYcDWfL29dop py17gE7b7uk0VGNf2m3iEKIl3z9Axb4e9G5BMG1X7gJwWbG5SNR2uGzbix5cOMSA hMqqBjHcsszoLDSvI+mhc2xaI8MeOxcVyginL3l43yS+CsOCbHNZtflFzhgeffOJ rc4zdqKinjlQGw+CCI63rwhzXk9g/zmQ/rsiNNOMDhG9gH6WzCaMuZee/QliywjB cUrUzxz+rYFcN6JuljDDm22Z+MzaSPfNEIm0laYm26m0mhNp/BVL7AWP2etjuezd huBupQLel7xRCzuMSf1D4pEO6I49Xsn3TmQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrvdeggdefgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgvlhcu jfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtffrrg htthgvrhhnpeekveelhfejueelleetvdejvdeffeetgeelheeujeffhefgffefkeehhffh keekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 5 Nov 2022 17:29:10 -0400 (EDT) From: Samuel Holland To: Chen-Yu Tsai , Lee Jones Cc: Samuel Holland , Dmitry Osipenko , =?utf-8?b?TWljaGHFgiBNaXJv?= =?utf-8?b?c8WCYXc=?= , "Rafael J. Wysocki" , "Russell King (Oracle)" , linux-kernel@vger.kernel.org Subject: [PATCH] mfd: axp20x: Do not sleep in the power off handler Date: Sat, 5 Nov 2022 16:29:09 -0500 Message-Id: <20221105212909.6526-1-samuel@sholland.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748693569614704630?= X-GMAIL-MSGID: =?utf-8?q?1748693569614704630?= 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 Reviewed-by: Dmitry Osipenko --- 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)