From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44BE7C4332F for ; Mon, 7 Nov 2022 10:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vp+DcoqPAPb6M/SZLgaCPEF3Ut6PodkaQ+36+iKCm8c=; b=tcGTuxRrjBmU5u WhDSxp1PQmk/Qx7bS4HcUw4ZcY7HaSzNzfuTJlvbcSGvST+0JiLblmfMhQbsZWAb73DYo7v2s7TGg yAijUAeri23eL4SMU2ROsC+nOBeMLDBYF31b/31VdEmxZJdHAObMHSiqKIsKSh8G38kntzutSG4Sy YP+uToFWroF6l+c6BAetz4m0SsmLnVVusde4HRiACLTREcKF/mRorogQKfE1aC91r5i47JEPDBxVd hIXlIqQTAi9Bqa02WoxKs1XO/mk3ucJFPmvtjpom/JpzZXN7qA7L7hGbHHeIGHZv5cY6GMMynqCq9 LYEiV+yMFr35obBfDZAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1orzmf-00DqYY-3q; Mon, 07 Nov 2022 10:55:17 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1orzmc-00DqW2-Bv for linux-arm-kernel@lists.infradead.org; Mon, 07 Nov 2022 10:55:16 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5789C1FB; Mon, 7 Nov 2022 02:55:17 -0800 (PST) Received: from bogus (unknown [10.57.6.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 728B33F73D; Mon, 7 Nov 2022 02:55:09 -0800 (PST) Date: Mon, 7 Nov 2022 10:55:06 +0000 From: Sudeep Holla To: Samuel Holland Cc: Dmitry Osipenko , "Rafael J . Wysocki" , Sudeep Holla , Mark Rutland , Lorenzo Pieralisi , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] firmware/psci: Switch to the sys-off handler API Message-ID: <20221107105506.pfoxmngp7shhci3p@bogus> References: <20221105214841.7828-1-samuel@sholland.org> <20221105214841.7828-3-samuel@sholland.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221105214841.7828-3-samuel@sholland.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221107_025514_492518_A9819226 X-CRM114-Status: GOOD ( 16.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Nov 05, 2022 at 04:48:40PM -0500, Samuel Holland wrote: > Any other poweroff handlers registered at the default priority will > run before the legacy pm_power_off() function. Register the PSCI > poweroff handler with the correct priority to ensure it runs first. > > Signed-off-by: Samuel Holland > --- > > drivers/firmware/psci/psci.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c > index e7bcfca4159f..6d528021925d 100644 > --- a/drivers/firmware/psci/psci.c > +++ b/drivers/firmware/psci/psci.c > @@ -13,7 +13,6 @@ > #include > #include > #include > -#include > #include > #include > #include > @@ -322,9 +321,11 @@ static struct notifier_block psci_sys_reset_nb = { > .priority = 129, > }; > > -static void psci_sys_poweroff(void) > +static int psci_sys_poweroff(struct sys_off_data *data) > { > invoke_psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0); > + > + return NOTIFY_DONE; Just note that PSCI SYSTEM_OFF doesn't return and hence the above return is useless. I understand the generic idea here and should be fine, just thought of pointing that the firmware won't return from the call. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel