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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54DA0C3DA7A for ; Wed, 28 Dec 2022 16:22:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231345AbiL1QW4 (ORCPT ); Wed, 28 Dec 2022 11:22:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233372AbiL1QVY (ORCPT ); Wed, 28 Dec 2022 11:21:24 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50F631B792 for ; Wed, 28 Dec 2022 08:19:22 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 228DE5C0185; Wed, 28 Dec 2022 11:19:19 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 28 Dec 2022 11:19:19 -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=1672244359; x=1672330759; bh=+MzbJuL0sz6xYgyGW+zwedxik v2ybOeYdYhDY6xmhzg=; b=EgjRXLVlzDO3JjcYyL+wRRhrOb013Iu2nzK8NjvUB voaTsi/8c8J/dPerwe9GRP0c6h2r7/1P8I7k5Dz3zjoLOLnzpRU8SUk2qbWKg9eR 1MLzORr7BDUczDuHhNXZGhy2Ls45lPa2bO+liasLEz0WVrrvLuOCMkwMOzwqgpkk xDjtrwkaMw6kJU1+CEvyLflxq6Bl/fIOIpWbCzlTWp6sMCrcXqEt0NzY9HNfkcdI BC+oa0TYHK567p9JMYeWEO5tsv1ArfMmEid7eDcDNbkz3xlZ3OooQATV9Z/6pLom F4+X1oRNzJU9vXuKwWnRu0rYvf4M9OcwSBts1UTpbMNpA== 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= 1672244359; x=1672330759; bh=+MzbJuL0sz6xYgyGW+zwedxikv2ybOeYdYh DY6xmhzg=; b=W7dQrHduKsuWY3JvJyYCqpaeZ5NviTqpcnpThpvNwbig6qO4O+g KSBtnpFupqSICqAVQ20+L2ya+/bB6kz0u2GCncnSukFUylW/6UZj7XNTvS79U6sm d6kbPvCMjIl+GndbnrU8dcctRC/WOF0oEPayQYUshOOGo7V6i3hVwVQ5M1oMFDP5 g54UQjmMIcn994h6gbuJ1/lR14IxCLc4ZI9D0uDsWUaB3JcA2e7h+eFlKgco571U MPnEyq3zc0N/LBBbCHMgJVOy9pY5Wi8ZSD2YuPci1yORd68mrBlWDYONnuW7oj1C IPSlMlwJLsoWNTc3Ue7PpW/54De1kWPFOCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedriedvgdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgvlhcu jfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtffrrg htthgvrhhnpeekheffteehtdetfffgfeetteejvdefleeuvedufffguedtjedvheelvddv fffhveenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghnugdr ohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 28 Dec 2022 11:19:16 -0500 (EST) From: Samuel Holland To: Palmer Dabbelt , Dmitry Osipenko , "Rafael J . Wysocki" Cc: Samuel Holland , Albert Ou , Anup Patel , Atish Patra , Geert Uytterhoeven , Heiko Stuebner , Kai-Heng Feng , Luis Chamberlain , "Paul E. McKenney" , Paul Walmsley , Petr Mladek , YueHaibing , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, tangmeng Subject: [PATCH 0/3] riscv: sbi: Switch to the sys-off handler API Date: Wed, 28 Dec 2022 10:19:12 -0600 Message-Id: <20221228161915.13194-1-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 if the SBI poweroff handler is unavailable. But the SBI poweroff handler still uses pm_power_off, so done alone, this would cause the axp20x callback to be called first, before the SBI poweroff handler has a chance to run. In order to prevent this change in behavior, the SBI 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 SBI poweroff handler is registered quite early during boot. The first patch is a dependency for both this series and the PSCI series[1], so I would like to get at least patch 1 merged soon. [1]: https://lore.kernel.org/lkml/20221105214841.7828-1-samuel@sholland.org/ Samuel Holland (3): kernel/reboot: Use the static sys-off handler for any priority riscv: sbi: Share the code for unsupported extension warnings riscv: sbi: Switch to the sys-off handler API arch/riscv/include/asm/sbi.h | 1 - arch/riscv/kernel/sbi.c | 63 +++++++++++++++++++++--------------- kernel/reboot.c | 10 +++--- 3 files changed, 41 insertions(+), 33 deletions(-) -- 2.37.4