Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4792891rwl; Wed, 28 Dec 2022 08:54:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXsc81wbnrmvr+dnlbpBSwu0UuKtrRh1h2C1y9XXJOUp/dNA6/+GJGcBk1HUpwJ16jVDE89q X-Received: by 2002:a05:6a20:548e:b0:9d:efd3:66ca with SMTP id i14-20020a056a20548e00b0009defd366camr38970082pzk.17.1672246453553; Wed, 28 Dec 2022 08:54:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672246453; cv=none; d=google.com; s=arc-20160816; b=XJyEUoZxSVbrZJT+FcT5pBQuHQYRQmKhoiOGqosO11pKOCKKL33RhQJ9UN7XhiJHnC jk9yA+iSg0KPq+4PlDtZvDpkcGPZ/FmdjQfe9Kl33/zvzz3she/52PkbmqzageP84Mto F93Zthz3jbrdop6yB9ZN7UyAKyKSTzFA67wkkArUkdI0BnTY/tcJN/oXazwwGN92KdGt 4olmqPxm+c0B5u3PVYDLKJxVpOL9C5weNOHctVeg0URDWpgCBfneWOeaD+NBAXw8/s4n 94LiPC0Dva0NT5yEW/VKTo0pRqHqWLBFnF5PSbcfGw4ItzSdyW4ftpGxBHXp4jZqKxAp EAhA== 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=+MzbJuL0sz6xYgyGW+zwedxikv2ybOeYdYhDY6xmhzg=; b=cTmqlM/pbrZaAelIzE4w3ypUVU+1zoPQchSw8XJCAFqmwmDdBBbQfnBjY2+Y0NSn3A TmMKblwNvQQHDGDFXQcqw24uAs1GQlCmNYuJfZByQXjLxmOpRAHGZhB205QdeGQsu36X cgwQ1rtgj3xu17Hjp+dOyN248lSxUYqxv1+BMu3DAW8nnPI5cxk9GMk/J3spNLgrWIaw 8Kftrmbjrc0S1yWfgLRnEbDHYVGK8YZc5QCYGHhXXjqGm0nPfJE4ZFHKkMHibafvrOHh x2Wru9laB0SlSriem6Pq1yiYwYVY7vL4UtMJ5Taw/jb2C9T8ARA5uGWhvPhhQZcxR047 mIQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=EgjRXLVl; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=W7dQrHdu; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z73-20020a63334c000000b00478f98348c4si17285756pgz.82.2022.12.28.08.54.04; Wed, 28 Dec 2022 08:54:13 -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=EgjRXLVl; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=W7dQrHdu; 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 S235025AbiL1QWy (ORCPT + 63 others); Wed, 28 Dec 2022 11:22:54 -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 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_H2,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 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