Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9389716rwr; Thu, 11 May 2023 14:20:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ712PSozeQlXzQHcE0jlrCp8MvSheMqHJLWkNgseBACrWh01O23hFBgTo32VkAQAFINYswG X-Received: by 2002:a17:90a:e281:b0:24b:3123:8dd8 with SMTP id d1-20020a17090ae28100b0024b31238dd8mr22300178pjz.27.1683840017011; Thu, 11 May 2023 14:20:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683840016; cv=none; d=google.com; s=arc-20160816; b=I1r5trcSQSJ33N05NzqOlqSMHujmpRDFQSiBPR/+jbGBbH6rIBGF9WLU4/8CCD/Awt ba5d28rj4i2cVBmoobppfkFLg9rFtH5R4FwxtQ6duHfSQL3ZGTLs+ayRfN+1tK3YJBwN Xet12G7QvJLZQ6drCZmrB3t36DQjy2dpD/U9bucYlePF/QKhLRuu0nO5RsKC2nNEErWd qPKQY9h6L+lFt3g+lM2kLoz9ikKK7fCZI5jsaB5BJQaWsrr2zqnpWsxSiunROOcT3/AY Tos3u95Mz/n/lG0tmPA/obz2bN/gU8Q484Iar2WExKI1eEJv+MI27uBIrQA7U22HqF/9 4ILg== 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:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=EmqiYN6k7kNOHcOaFBtfG/CJoGmGnLxuGsiwVK55cYc=; b=jZa4Z/vlH0Y30PM1sEvAF6Qe3coURe/E5ec0tETuETjvhA29KK2bZjSvejVbZ8grDZ 0fkbYwNyAsx9mjzkeOP0rrEeJCPR59KTBfOqqN+udZPIEqss6utYUjscgr88RTHfcjb2 TxhGbZFGvW5v15CGrjyVUyOE1dIsmcIjbvNofkdKnrLhWU3FmCIr/dgtIO1TkZgGYYU1 Hp2X8XfuNb4shXyO1p7/z46n2rRm0fd0UJ4FScPRHXHtKQVtBlABAY/maG5sRqp6FUqh Gag3Rq+wir31txjNrSFtrA+TTkq7IXNcJ+b9DDY+ApDJIrwbr9vb2m3/2EA3W4bHPJjl jYbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=QMR7fofF; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id em14-20020a17090b014e00b0024765bb4f7esi20428884pjb.25.2023.05.11.14.20.05; Thu, 11 May 2023 14:20:16 -0700 (PDT) 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=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=QMR7fofF; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239026AbjEKUx1 (ORCPT + 99 others); Thu, 11 May 2023 16:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238932AbjEKUx0 (ORCPT ); Thu, 11 May 2023 16:53:26 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 233794C12 for ; Thu, 11 May 2023 13:53:25 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1ab13da70a3so88217305ad.1 for ; Thu, 11 May 2023 13:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1683838404; x=1686430404; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=EmqiYN6k7kNOHcOaFBtfG/CJoGmGnLxuGsiwVK55cYc=; b=QMR7fofFIz7UTDWgIWfb/8kl0kAphqE7lnR7CJeis2c94cLuhg3/r0tQz6eL/sMqfr q5xNDM7Hyo8pCRISro7QIUqhbV0mD85g5HYjAcBlMXOYLVpaVTD13xfZjSQmD8E/djLw 0NPo8sFeER6dWIgeC+RaBaTHqqemzXR6zPA6W3ilnRtavZimjUbZ1Sa22tPEWq0Toe8y alpjDn886e8wtA1bMsiOvg1d8k7nW6tnvOIrrs3/Gymhm4LuaTtX3LuZ5jrexsSsXg2A PA+LVL4p9c22qmItfYfCYjj3HB682Ah3O0gRd7XS5qTuZaG9SwNSfX4TZgWWPy2lHlYp 2JMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683838404; x=1686430404; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EmqiYN6k7kNOHcOaFBtfG/CJoGmGnLxuGsiwVK55cYc=; b=jUvPcAmNvU/nZYbjc9cL/ybuuOkFGvgJ5TKGv5ljBtmSm1Oau/BoKqHeC4U5AaaPE1 EZg9Q+Isml/2HtW0XrTy04Y8fGuA8+b5/ZtaYrPb+LEE50XDAS7SqtPam4Wof7Y4PyGz jCj8QyEAzuusc1g3G1cHqfcLpoFOBdPDqi6TY4fGSbIE89MAzwm5kirT4USUts5d6h7Q 9uIIf1bEjKhxELAtGkJD7mJqNdmTArQFdWYt4/bFNDHxcNQFhmQ299qANwRuRlcNzG5Q m+4ahasCV7neu/jOooolUbpfY5ebyL9tZkHFWeThIvZ69mB4McBV/p6hCsLoNtWL8cud PdIg== X-Gm-Message-State: AC+VfDxiOt4CRdBReYqJdJ03CLxXPxoRH3ZWkCRopx120AP/p8FjBib8 uTotCf/8mMxUrMWz3uK15ntZDg== X-Received: by 2002:a17:902:ce82:b0:1ac:95c2:ed75 with SMTP id f2-20020a170902ce8200b001ac95c2ed75mr15028551plg.53.1683838404455; Thu, 11 May 2023 13:53:24 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id a10-20020a170902ee8a00b001a9873495f2sm6366920pld.233.2023.05.11.13.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 13:53:23 -0700 (PDT) Date: Thu, 11 May 2023 13:53:23 -0700 (PDT) X-Google-Original-Date: Thu, 11 May 2023 13:53:02 PDT (-0700) Subject: Re: [PATCH 0/3] riscv: sbi: Switch to the sys-off handler API In-Reply-To: <20221228161915.13194-1-samuel@sholland.org> CC: dmitry.osipenko@collabora.com, rafael.j.wysocki@intel.com, samuel@sholland.org, aou@eecs.berkeley.edu, apatel@ventanamicro.com, Atish Patra , geert@linux-m68k.org, heiko@sntech.de, kai.heng.feng@canonical.com, mcgrof@kernel.org, paulmck@kernel.org, Paul Walmsley , pmladek@suse.com, yuehaibing@huawei.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, tangmeng@uniontech.com From: Palmer Dabbelt To: samuel@sholland.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Wed, 28 Dec 2022 08:19:12 PST (-0800), samuel@sholland.org 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. > > 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(-) Samuel: do you mind rebasing this and resending it with the reboot folks in the To list? That way we might be able to get an Ack on the generic bits. Thanks!