Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5636492iob; Mon, 9 May 2022 23:23:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfmKqMOmBroG/iVuVGGGeuJ47dxbZfDB9rF2zdtoU9mitRuW0b0jmQnktXWxKdJEH+rWNf X-Received: by 2002:a17:903:11d1:b0:151:9fb2:9858 with SMTP id q17-20020a17090311d100b001519fb29858mr19266743plh.136.1652163784924; Mon, 09 May 2022 23:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652163784; cv=none; d=google.com; s=arc-20160816; b=x5nb/hvmPrMcnebBpMsV3j61/FEiqrE1g9a3v5jPEybjYCBWIGKgt/7fFO1Q7zecSB stydoAcUZdMfTywZVy97lnnv7djmSGmVi3WLpEdce62B+IGYZlbLin8NrnTPAyziBoWq D4vp8DUdifqzUpvEU7RSjaKW4s8BFI0RyCeVqE3lHfVoNYE+FI5y4/EmVbhPJrrRBRo0 gKDQ7YF3Non0sf1gqnxOHgTj6E00ni1rl45scWGOyNX+MsuL0QfgDp8D2Ylbc+EdZ+eH va8LyaK8bwsCGqUpe6n+pWWiodnbWafSlJlSL+zkY05g+dBvVr5JlcPslCr3zoZs8p8u Busw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Qo/3gQ3yVOQgE+D+1oprVjcSchDmafX0tgY/A+fDfQE=; b=KuiTndgeGIsOlP/Dq5zPY/ap7bHSGSfzwkekVf7PomRs4UlEi9ui83hTEYXVR7SCIy 5eDfz10fvq0Kv4yX43Jwqn2y6gcTBB0FNpjHc1szvFTJY+XfV3kTbamMsTGJx5U9FxCM ieTZp5C/Zf4cZXUpXX8j+Jkcj1uYVKP09XaIUxsBjmbeYlixsgWeIEsWLZwOFMXFugbd Xgq+LWjGiOz8fCLT5EfQC+2htiIDHIiJ41A06qCOvmeTFoIDDVrZVLkz2yTJqWspK86S lRxVDE4gi0oJWvDJELiQGtz6vzMDj+LAe1i2LYO1D1mGoGEnbUF0ka+qr8Jchceo0KcH ibxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=AZGjg6aj; 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 me5-20020a17090b17c500b001d28bc0e241si2364666pjb.38.2022.05.09.23.22.50; Mon, 09 May 2022 23:23:04 -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=@collabora.com header.s=mail header.b=AZGjg6aj; 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 S232860AbiEIXj3 (ORCPT + 99 others); Mon, 9 May 2022 19:39:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232858AbiEIXh6 (ORCPT ); Mon, 9 May 2022 19:37:58 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59E89250E98; Mon, 9 May 2022 16:33:47 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dmitry.osipenko) with ESMTPSA id 73E431F441D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1652139226; bh=NosviWpVno2jyBA/nRbYSTQtEBj8GV4Z9PewSWM1PEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AZGjg6ajBdqbT1rRkOpHVX0Fuw48bMRqsSdYq9OtGSbC/n4RUaCQK6bD1TfVppwXu A7CMRQ1sz+q7MHQphaKKP01aCStcy0QSDdJj6vPvNjv9pUTGAbqF3VBfFZMfHZLrUT 4gIsmgu/2N3okauIgJNPFKpgzlwu1WqpdL2MvAV4GSqjXPbt4r9xFqMPheNolvDet2 kMcoUipX5yr2TOyCk4QjYL0MBISYscS7bfG03xrjN4MwX8RPG34WsyJWFAxY/Npiwj 8KVsTsWb21V2VhPTYdzbV4VLe2voj7X93srVxn9dA4Uv/y1s9ujK0+2rqIH75bp++P fqEdP4SIC3mNA== From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Russell King , Catalin Marinas , Will Deacon , Guo Ren , Geert Uytterhoeven , Greg Ungerer , Joshua Thompson , Thomas Bogendoerfer , Sebastian Reichel , Linus Walleij , Philipp Zabel , Greentime Hu , Vincent Chen , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , "Rafael J. Wysocki" , Len Brown , Santosh Shilimkar , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Pavel Machek , Lee Jones , Andrew Morton , Guenter Roeck , Daniel Lezcano , Andy Shevchenko , Ulf Hansson , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Cc: linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v8 11/27] riscv: Use do_kernel_power_off() Date: Tue, 10 May 2022 02:32:19 +0300 Message-Id: <20220509233235.995021-12-dmitry.osipenko@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220509233235.995021-1-dmitry.osipenko@collabora.com> References: <20220509233235.995021-1-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=unavailable 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 Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new sys-off API. Acked-by: Palmer Dabbelt Reviewed-by: Michał Mirosław Signed-off-by: Dmitry Osipenko --- arch/riscv/kernel/reset.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/riscv/kernel/reset.c b/arch/riscv/kernel/reset.c index 9c842c41684a..912288572226 100644 --- a/arch/riscv/kernel/reset.c +++ b/arch/riscv/kernel/reset.c @@ -23,16 +23,12 @@ void machine_restart(char *cmd) void machine_halt(void) { - if (pm_power_off != NULL) - pm_power_off(); - else - default_power_off(); + do_kernel_power_off(); + default_power_off(); } void machine_power_off(void) { - if (pm_power_off != NULL) - pm_power_off(); - else - default_power_off(); + do_kernel_power_off(); + default_power_off(); } -- 2.35.1