From patchwork Sun Jan 1 18:17:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 13086420 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 6677BC4167B for ; Sun, 1 Jan 2023 18:20:48 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Mb8MSweKHTbypOd2/74KjPcJHwmdxdVf4UV8PowUGac=; b=bTAscV9BWfL06m R2fzq/GE29f/GlVwPXF0TcJLBgeSGCu28yIrxyN5L/2yGfYBLHCWQwc+9WliUsLqLaMx5hrexi7Z4 2+W6+pcfB8rES6MDLRFKhMFLhmlMWUkoDlCv26/gy3N5C388VaWmNE3isJrlqQnsNaB254iMlJYij guIRKCq7XOYngsCpqLsx3fh03xL1Eh+H/wKUq/oBaC1Q6/QIDJnRsppHwrZ513Cxy4KArFCVclK+B zymZB5yGxkcxoSfrrJ09fShd93CTVkI49q999I1+Eo8fl6jK117CerI136mUNh5n4L0E4d/iFuftF G7srAfMu4JgnRpe80Nog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pC2vm-003dCx-OP; Sun, 01 Jan 2023 18:19:35 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pC2th-003cL9-7g for linux-arm-kernel@lists.infradead.org; Sun, 01 Jan 2023 18:17:28 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A8A565C0059; Sun, 1 Jan 2023 13:17:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 01 Jan 2023 13:17:18 -0500 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=fm3; t=1672597038; x=1672683438; bh=6LDx433akbFpSiQ89PhisoZU8 bENmFplx9mTGmrQgOM=; b=Q9EfSji/0XtghxbDEayzsGshv48PRiYKYF8ZD0tDm IfU1KTb/NnGFmyYNTIbzs0z5AYzd7yX0mTuMwkA+7NBZnBZPSr1PSO3yR1E+lkKa ll/fNvui0sLOrPrpW8syEtmXJFWkXYtgbH2oU+pOQYToLowD6tsqa/Qq6FrzduXr 1CeIrzIzpF7ZM9aZ8r5ktr1vSDfoK9c8AsA7it/1Tnurc/gCV1Y+TKVA8xmDCIV/ IO161AqfpN1e+J1ln2zuTLjZMdBpDixKCpEcOLwusaQV29eyKc/2ZOoNYWAFXzvL /iCQka2rQMDB+hzHAJg04iGxVEZ8yEVknke4nXQ07EhVA== 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=fm2; t= 1672597038; x=1672683438; bh=6LDx433akbFpSiQ89PhisoZU8bENmFplx9m TGmrQgOM=; b=Fxmt4EEH6mO+pOE/4iOsKz5boymdNR5Tadith97AV1bnx8oEOaT cYOiYf6T52oXZSpMW1xeaBzixVoB3AKp+aCAMwB4Tm7iaqqIiQXSRYO2OXwG2osq 8meYHYe9JON4n/UXDq+f+mV9PLXT3UkmSKiIHUSSgMjyeyk3cfYdTEDVitlrrfOE WgW08WSNLjMME+h6EWkblnoXjcJmhS0XzkTwRrvl0db38sTy0eDSIuShqymP7lw3 pcZ73FV+24HBYQkgNPJnJtI2DaxZtf00S/AR1d0YlrxMFIWCA9TN7jM8T1ZXMEQn XXGDK2uR0CPlJ0HmZsl44AB0uc3Iui4hi0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjedtgddutdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepkeehffethedtteffgfefteetjedvfeelueevudffgfeutdejvdehledv vdffhfevnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgrnhgu rdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 1 Jan 2023 13:17:16 -0500 (EST) From: Samuel Holland To: Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Dmitry Osipenko , "Rafael J . Wysocki" Cc: Samuel Holland , John Ogness , Kai-Heng Feng , Luis Chamberlain , Petr Mladek , YueHaibing , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, tangmeng Subject: [PATCH v2 0/2] firmware/psci: Switch to the sys-off handler API Date: Sun, 1 Jan 2023 12:17:13 -0600 Message-Id: <20230101181715.42199-1-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230101_101725_381451_AE405A53 X-CRM114-Status: GOOD ( 11.84 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org I want to convert the axp20x PMIC poweroff handler to use the sys-off API, so it can be used as a fallback for the SBI poweroff handler on RISC-V. But the PSCI poweroff handler still uses pm_power_off, so done alone, this conversion would cause the axp20x callback to be called first, before the PSCI poweroff handler. In order to prevent this change in behavior, the PSCI poweroff handler needs to be converted to the sys-off API first, at a higher priority. This series performs the conversion, after accounting for the fact that the PSCI poweroff handler is registered quite early during boot. The first patch is a dependency for both this series and the SBI series[1], so I would like to get at least patch 1 merged soon. [1]: https://lore.kernel.org/lkml/20221228161915.13194-1-samuel@sholland.org/ Changes in v2: - Update commit messages Samuel Holland (2): kernel/reboot: Use the static sys-off handler for any priority firmware/psci: Switch to the sys-off handler API drivers/firmware/psci/psci.c | 9 ++++++--- kernel/reboot.c | 10 ++++------ 2 files changed, 10 insertions(+), 9 deletions(-)