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: 3448 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3864255wrt; Sun, 1 Jan 2023 10:18:41 -0800 (PST) X-Google-Smtp-Source: AMrXdXuFnBwPEXXwFLN8TiaiXgAApJf3RJugm95kmLhcVEigpaZe6eAm7eya+lTn9U/YU2aft3HL X-Received: by 2002:a17:902:eb8f:b0:192:8ec5:fd58 with SMTP id q15-20020a170902eb8f00b001928ec5fd58mr22783157plg.6.1672597120961; Sun, 01 Jan 2023 10:18:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672597120; cv=none; d=google.com; s=arc-20160816; b=SeLLVb6i0O1XXxgELVtw9BVkDZ7ucm4Uwsb83TThwlIeisC8b1322VFLaxxwXXWcgN hDWFBJxv62ytQt52bYKOKiAwgxHsSp8u6kMQ1YDneOvhdhqhhnb73r6EdYCKQX0EIwqQ liVTctN99jcGxckWemh58YlrD5Uxc+9FtTxWozFJlF2qUsD9jHZgBF71sNRV/LD78HYO 7SwuoTEQeMlpo8CeCL44bK+DWcMH5N1nk0QAbVuFKRzI7s1e1Bj32bHU2g0Vz3eToZsy Lal7Cyyk17dYjAJYc1Bxqm92Jksj2trP8otIJYBHrzLlo1wwuDbRbU1gRANd6F7o4A9b CHUg== 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=6LDx433akbFpSiQ89PhisoZU8bENmFplx9mTGmrQgOM=; b=eIBrJwHoWOP6nwhfdMZVMrBCZLZvyMVFr+mpKlkAuxz/8ODWrwkDqQGHUEsR6cpTjS /FAyDGNHVf0sDRx62b/s8Wh+dQgOqZS0TgkZKKD6IqMre6T2yRcctSGS5nKPPBQWKKgw sSOAS+EEwVyynFH/NkoWrN0/OyBJIZXLr0QIuF2rgwqokofIWe1CiC0d6w/Tb3VZlt0X fxgsZc+FesvYq67GcVinILnC1BxU5DVGWXF4vsUME6fli8bsFBW6htryq/ZebW924Ezz hNmnw9ZA0WAMLCLR5Ho467qSKfgZ4j4c5Mk7z8AmNxBmRc+K5AgtIVfcMX65siwv2H3Z VZhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b="Q9EfSji/"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Fxmt4EEH; 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 z11-20020a170903018b00b001782a6fbc7csi14690101plg.463.2023.01.01.10.18.29; Sun, 01 Jan 2023 10:18:40 -0800 (PST) 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=fm3 header.b="Q9EfSji/"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Fxmt4EEH; 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 S231208AbjAASRc (ORCPT + 99 others); Sun, 1 Jan 2023 13:17:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbjAASRY (ORCPT ); Sun, 1 Jan 2023 13:17:24 -0500 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36BC52BC4 for ; Sun, 1 Jan 2023 10:17:22 -0800 (PST) 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-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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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?1753845146221397209?= X-GMAIL-MSGID: =?utf-8?q?1753845198292632107?= 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(-)