Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4941431rwl; Wed, 28 Dec 2022 10:53:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXuKYjify3M8OgVj+k/O954WGIT/20ZoTg36p++co5kiCFbATyK/MGJ9GYpvhKtrshvkbgqh X-Received: by 2002:a17:902:c94f:b0:189:9e91:762e with SMTP id i15-20020a170902c94f00b001899e91762emr42404906pla.57.1672253588568; Wed, 28 Dec 2022 10:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672253588; cv=none; d=google.com; s=arc-20160816; b=E8Z2lIM6NSDST4iL2tvmWTw9Aahuamxbf6KI1S9RN9imhtBKqYj/X/SMxaEbr1l0U4 lGo0DVTaGzF5Y2WRDRcfNGtZhpTC3Ov8fwQJFNBkzmA5N+5/AYqFMLtZ4v8Kjj9jg5ph yIjq1J0/+U3ATdPq0mLnEOFnuIaNTxfUIL7hVmts0KqP3VWdu0BzybBsJ+uUmRbZRC9b J92/3kGd7W2L19aRKiqir/DFDo/Ovp4Fm+GlXkn9BRUFlI09apAHVRnACGcevPsHexBt l7ZaiJRXW0v6lMhfCi5sku8hjak9FW2heoVNjFchsYMX6rXTduuxvPt4OwTZ7Tny66Yb GgGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Cx10HzAu8W60TDlHuuSVvgW17DBCMSfmtJXRLtiGbeg=; b=VatSinKIboD14dH4TkUcHRE08zQevGaR50uFJfESXL5Y0BwpLFdgmciIb3lcBadsZp 51FWPXgLmhQEhQLaenTDufW3LH97J8nv4pvBxQ7yPSapMA6F2lXU/wRQAb2FqEeye4wW zSsqkPoZgeJkSAy0etqHsrkgGRslzSzEjf8UjjR2/mTAYcUF0E+s1ijVqCLV3mpWtUC6 PY1rVKR7tjqesMDPt/jWB/KUEf7WK3z/z5pnNtKm5C8mtB2Yr5ZLN/WzK5nHhZ4mtCZc 5SxTqEp4o3qc2hHwiustZ7fsuFdttwOCmETmHyglceZIUFNLzn9rsqPJqgQrML/wHTVP FElg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cMN8sn2q; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a17090341c700b00186c3afbd25si17177744ple.349.2022.12.28.10.52.58; Wed, 28 Dec 2022 10:53:08 -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=@kernel.org header.s=k20201202 header.b=cMN8sn2q; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232071AbiL1SaY (ORCPT + 64 others); Wed, 28 Dec 2022 13:30:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231400AbiL1SaV (ORCPT ); Wed, 28 Dec 2022 13:30:21 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C87B313DCB for ; Wed, 28 Dec 2022 10:30:20 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 68D01B818BD for ; Wed, 28 Dec 2022 18:30:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2C18C433EF; Wed, 28 Dec 2022 18:30:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672252218; bh=8GdpfCPYNbZ7pONcybw0AZexxDzJ9PmxSxjOD45MToI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cMN8sn2qVZcrzRNGqHFFHegiRkzijJ7lgl63Nluh/32moJDMxsjBBpdfOHtOU2m/P JUZxv0u0XGMe/kTDCobfG+b7TcBZvMm0Q4s1a2Oha7ctEXj9ryy2aC97Mt2O9Qfz4p EM4BdlRjung9oxz/0osT1n6rkrsrTazQ2xn77BQSgRROGcMA5Wh8s4mXvCSowlG+o4 8ZJcLZrcVfEyr0IZLvSdIEwTzpcRbGOGIXq4q/Sffb+OMU6WW4gPwa7Cz+haYYqKaJ cm0n6r4+pJi0//NsLGHYXoaXer2sWhqyFJize9T7g27HkcJ+U31DzSwh0WR25lDlIn 4Iu49epuwIBPQ== Date: Wed, 28 Dec 2022 18:30:11 +0000 From: Conor Dooley To: Samuel Holland Cc: Palmer Dabbelt , Dmitry Osipenko , "Rafael J . Wysocki" , 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: Re: [PATCH 0/3] riscv: sbi: Switch to the sys-off handler API Message-ID: References: <20221228161915.13194-1-samuel@sholland.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ATLP0lEXvRX45tso" Content-Disposition: inline In-Reply-To: <20221228161915.13194-1-samuel@sholland.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 --ATLP0lEXvRX45tso Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Samuel, On Wed, Dec 28, 2022 at 10:19:12AM -0600, Samuel Holland wrote: > 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. >=20 > 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. >=20 > This series performs the conversion, after accounting for the fact that > the SBI poweroff handler is registered quite early during boot. >=20 > 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. >=20 > [1]: https://lore.kernel.org/lkml/20221105214841.7828-1-samuel@sholland.o= rg/ >=20 >=20 > 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 Not what other stuff has reboot support, so I gave it a whirl on PolarFire SoC & it seemed to work as expected: Tested-by: Conor Dooley Thanks, Conor. --ATLP0lEXvRX45tso Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCY6yLMwAKCRB4tDGHoIJi 0ivzAP9+SH0Lql0XKHnaLv07MiLUmZWgUzA9fyFMuC2SL6mJvAEA+nzYanZ4TgWy B8EyY10df0N49zc5ohweBmmjHCZz3A0= =7zvo -----END PGP SIGNATURE----- --ATLP0lEXvRX45tso--