Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1036610lqp; Sun, 14 Apr 2024 10:52:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW1v71wF/G40Q2Xhutgzf9Exo7OTNYLsFVdHbm+EQzBVsQh8bO14UoEuzuMU1jVOZdaFVkp0dtguE9MEpCXF4m6BH2YIs3N+6w5qxRmGQ== X-Google-Smtp-Source: AGHT+IG22wbi8vXGjHz/aXgPLUS2cLQm5xSI9QhZMcWcDPrGDD9eJ3YKrMM4eEGzrxvBjKkijqT9 X-Received: by 2002:a05:6808:b17:b0:3c3:7cc7:f25a with SMTP id s23-20020a0568080b1700b003c37cc7f25amr9033538oij.43.1713117135584; Sun, 14 Apr 2024 10:52:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713117135; cv=pass; d=google.com; s=arc-20160816; b=cmC35Ft+AN+zJDj4gjMsyBBcVGnbyDM2k0l0TqPddvLp7WMbPWEtJs09HbHDfkzoND D+bJYdWGh+qDurVFwbnozwm7OQZDQ/gADWr8B/tA2FhiZ0CxbML9A0IAlED9+V/N48v3 YbvDvCvIOCe7IiyxIkyLqnJeTUk0j4nvFReLzOmjsh3lfBI8Hbt2ruw9pk9C+emtPh7/ Hd5vxkwPshhJY++JezmvzwmzVzh1AIgAUy0G9lggtWrrmEaDXTQRCHHxxWAWwqyYbzUA Bp5ViJXeaBla5wTsXz05qYVKlRmeNibO7cEA4yTUmNamAkIpdTY2DvSLtn9VTbzPHk06 JIgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=aGbD/TAa5KJlMRsAQhEl4aSgv9w7lkpEn/CUPDvwQVg=; fh=vK+byv2NiDL0Zg81DfsnqC1x6PyJAaeWYrL0F/D+QiI=; b=jCP32OKDIEdtSrEbh2GTguMbKA0eMhGMQgB/y+wH4fVYazQfXBZhWKv1Yf7f1Q4mzU ssqB1PrOKFDnfe8KVI+X2CoiYaIOdye9myn5s+wIf8gtqx3uwjdnWD4+5Tix9BfqAUw7 Zo05pyg8wc8VGfXQlM7uTtpzhV2znveU/7T5ugNiwDCVhmOXRpLl5msvbOGqeF426kgk rhkDijeCuwFKtjhSJhgocF99+MASvh3tuDBhfrtCumyzz0OObtxUw3QJfZKRZLw/s21N W6opdtyN7TfURkyxcW9yJjDl1vz3vhxt5TrPNxDP7z+VuPCrqYGB3Czd5HocvFIUxwlK PVfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=VXFF7a42; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-144313-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144313-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v19-20020a05620a441300b0078eda6d7446si3707885qkp.415.2024.04.14.10.52.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 10:52:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144313-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=VXFF7a42; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-144313-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144313-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 473EF1C2117A for ; Sun, 14 Apr 2024 17:52:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C11AB135A6B; Sun, 14 Apr 2024 17:52:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="VXFF7a42" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CAF413443E; Sun, 14 Apr 2024 17:52:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713117127; cv=none; b=G6mLmp2Ff5sWFuoosUZDG8yKPNPYxiBjPlXmHln/8HY1WBtHFxUJUjC2UBoTf4wghG2af9ZHksVAlt0Ki23ulMSGA2x0YpYgqpBpKW0UwKZKJt4fBNWvKkhCY/Sbv37kyJqoVD3l4WtMclriSZVeWEEcL+H56AmkzfhT56L1XOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713117127; c=relaxed/simple; bh=7oeIJBJB28bTtI1s924RfikvUhz080zhzK+OctRWIX0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FF/Br0HklLcq+snRgt2GPtcP/1KItjPrw1vOnhP7qd+HlhlWWTlsUlhOXrjvfeA1rM109k2zVGOG33bOcz8FFmNEGCih484IuSHqRD/wH3oziRiGnAUCMuFwAg1uWK3NgX/cKhqcRd3xXKNe2CDLnBaDy2uSv8dbjELJ8Qqjekw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=VXFF7a42; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1713117124; bh=7oeIJBJB28bTtI1s924RfikvUhz080zhzK+OctRWIX0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VXFF7a42IADRYKhS+sBrSGfjmdAs85LDOwP9HMq5H+vYSp75SKYhQSrdMb8cRKQnq usMzPmf4/OLD6WNVR+2Urku1hyGSmMzjkknl66wX0hCEY+8yfh1LDUSc4ZUkOawl33 QX6sOma7NStoOGHe3GB0KT9hFoIepEbrwgoYvuagBXZEFoxHPgB2IGZ95+e/LIciZ2 fhtV6yxJQJR6ecWLrfdW3MR2/SFAUmmitHsYWcFw/CBd+eOnTpmkXsIq6ZyoaZ/vVT brPfDterPmxMmSLExE/4MKlFtOIEYggBvAj5v5utI0I6GqjEJlHaRxol2UCWYGZMnF JsSCt4nRcMvTA== Received: from mercury (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 9273B37813CA; Sun, 14 Apr 2024 17:52:04 +0000 (UTC) Received: by mercury (Postfix, from userid 1000) id 3376D106134A; Sun, 14 Apr 2024 19:52:03 +0200 (CEST) Date: Sun, 14 Apr 2024 19:52:03 +0200 From: Sebastian Reichel To: Stafford Horne Cc: LKML , Jonas Bonn , Stefan Kristiansson , AngeloGioacchino Del Regno , Andrew Davis , linux-openrisc@vger.kernel.org Subject: Re: [PATCH] openrisc: Use do_kernel_power_off() Message-ID: References: <20240331070230.2252922-1-shorne@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5g3tqu2f5hovaone" Content-Disposition: inline In-Reply-To: <20240331070230.2252922-1-shorne@gmail.com> --5g3tqu2f5hovaone Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sun, Mar 31, 2024 at 08:02:28AM +0100, Stafford Horne wrote: > After commit 14c5678720bd ("power: reset: syscon-poweroff: Use > devm_register_sys_off_handler(POWER_OFF)") setting up of pm_power_off > was removed from the driver, this causes OpenRISC platforms using > syscon-poweroff to no longer shutdown. >=20 > The kernel now supports chained power-off handlers. Use > do_kernel_power_off() that invokes chained power-off handlers. All > architectures have moved away from using pm_power_off except OpenRISC. >=20 > This patch migrates openrisc to use do_kernel_power_off() instead of the > legacy pm_power_off(). >=20 > Fixes: 14c5678720bd ("power: reset: syscon-poweroff: Use devm_register_sy= s_off_handler(POWER_OFF)") > Signed-off-by: Stafford Horne > --- Reviewed-by: Sebastian Reichel -- Sebastian > arch/openrisc/kernel/process.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) >=20 > diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/proces= s.c > index 86e02929f3ac..3c27d1c72718 100644 > --- a/arch/openrisc/kernel/process.c > +++ b/arch/openrisc/kernel/process.c > @@ -65,7 +65,7 @@ void machine_restart(char *cmd) > } > =20 > /* > - * This is used if pm_power_off has not been set by a power management > + * This is used if a sys-off handler was not set by a power management > * driver, in this case we can assume we are on a simulator. On > * OpenRISC simulators l.nop 1 will trigger the simulator exit. > */ > @@ -89,10 +89,8 @@ void machine_halt(void) > void machine_power_off(void) > { > printk(KERN_INFO "*** MACHINE POWER OFF ***\n"); > - if (pm_power_off !=3D NULL) > - pm_power_off(); > - else > - default_power_off(); > + do_kernel_power_off(); > + default_power_off(); > } > =20 > /* > --=20 > 2.44.0 >=20 --5g3tqu2f5hovaone Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmYcF78ACgkQ2O7X88g7 +pq5mQ/+M+426GVgXDcqLWaBeZW3HA03bp5BIZ/MDyTJhm0Rddyq9+9y1SftS9bc A1Hn5oGq3LBhUarGxPIsDzum+BFAnY9H0iLLNSa9GxFNHvatxsEsPPLAgF1+M3Q5 PaU9fBuC25Kihszf9bfnopMAt+3RbgDc2IVQv/f9sPjnd2S//342bFq2e8E7MTGp sMa91/Jn4/2OPwjiSogBx1LehE4cnREYOWo7ruBCp8fW4e6G+wpQ5FhSVfe3NF/m RYVpsVXGvVoIU1XecjC2CTi6g0MKJ6xZhXfjjRnmYDHnod04lVggh5zKzWgO6j+b 7M+7pw7EaCce/38W5u/hM40X0FH1GT/ZUdmTFhaBPUFzBBTpw1X9HXe0VLJhIYGe urGx2G6QnX/x0YbDrbKJv27NsgVorKfE5qwPtpbD4MEhQqWovEl80Ysv0gCajs08 RmPVqqmFsxSqbPjsrzP8BL1bPTMBN/2iM05hzScis9/OgrGHRuSm8TNCGx7stYpE PBoiE8bMlEKREoLriPRrcKvkpPCcKD1T19hsjonZZpLry6sTiQaCQbbeugNM97uK EWy5DmeTgiYSQ/10auOYWkJG2Tp1FKPWz9o5D892DBrRKeyweHnJEF5g7LYjC+hy 5IQvYdd8SKIyrJACVazpoPbMWk8bjnmXuwBcXp8x2G+o7NtSzxY= =fROO -----END PGP SIGNATURE----- --5g3tqu2f5hovaone--