Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10904013rwr; Fri, 12 May 2023 15:06:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Ve7l58JuvhOuLnT81sdJGFiUDAgMdlL7VEam2DJumZdMTSINm70aay9WZrKpVTeHS5wBh X-Received: by 2002:a05:6a00:2289:b0:643:90ee:587 with SMTP id f9-20020a056a00228900b0064390ee0587mr35251388pfe.18.1683929170331; Fri, 12 May 2023 15:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683929170; cv=none; d=google.com; s=arc-20160816; b=ApleNLGE1FSl1IETdz7PyTZT1fTWgNgtuXmeQGgXwUTH9fuLHxn1jdUiKZzjHS2GA4 S7pIHLPwfgs9o/Z4G/hJcxSd0BooEb2benZAV+Jp+/xLDvL0/IYysJ261hvr9VtCGUxZ A8x8Y2qpwA5qGm2z3OVaBI38AjDjpjROeunLjfZZIHx9XikOajWuS5P6u75Nu/9b1H0l VPfInlupjcryw4jcxeY0owS/ubJeMNSm4LziDT454yWAf2NKFElMiN3D83uOCC5Uqrvd FdyYBzBeguCY5eLNzwTu1W+N+NBh6FGF86riQWGeMwn/gozPglVc0nfumezAVvcHpaoF an2Q== 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=HXshd51fH2+G3epdXCEAiwTlwyZiu61NCKXGF8cY8aI=; b=U8ISbhT7BbAasLw9eXSNtEtm2uCoHd8wz/CvPVqx/ZsdOUXzLr+D2G47nj6rF/G01g 68b/5jlTkICX0qrtiYL+dXsDG29osDD+wPhaJit1qHxQ2JlWx8TuIrfv80t2/3r5A7AD MmnXOJ48NMHASKARaPAI4kodFKVRlSGeO7zt8rKnnABMwheFyfl2dkhoIRPa8sqPxa9Q lJW6R6UC5s4iMMvpwe44tb50ox7Jj8kS2ePrhRTI2gGJVIkebs83L03fO5eqiPXDSxyM 2QcuGQwpD/ZgzSu1TSf9PHQAbauDWCaU7B6Rc4U4SEJ0gHi+da6wbHM+yAe1rVVYmsL5 wrZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=hijUWW7Y; 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 z1-20020aa79481000000b0062a450c329dsi11033811pfk.93.2023.05.12.15.05.55; Fri, 12 May 2023 15:06:10 -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=hijUWW7Y; 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 S239498AbjELVuV (ORCPT + 99 others); Fri, 12 May 2023 17:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbjELVuU (ORCPT ); Fri, 12 May 2023 17:50:20 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C54312682 for ; Fri, 12 May 2023 14:50:18 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6436dfa15b3so7084174b3a.1 for ; Fri, 12 May 2023 14:50:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1683928218; x=1686520218; 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=HXshd51fH2+G3epdXCEAiwTlwyZiu61NCKXGF8cY8aI=; b=hijUWW7YGEiY7G1Qeg4PABKlij9oIFKh1iXUlbGTJjd4I+SL5j3NCzvgEQ8zoZT4aT wy192rGcvymwNscv/Tr+wKES91UJhfykzelovxv/OzgMvslZurtTmUk98kmx9aEDqPQ6 jVublaFURukhXJqmbDLw4rC5OpSRojatblM3MW3l71zW9MQbcNeimQNcLs81fBxSj5nx 26wlq4DQjCF38eIM11yBQYPYvPf0u+stV5IxKTsaR3e1OmkK/I2MZnCJcxrJNpocMEoy +8lVR/tWKaoFKAjL1FumNIGrc4eA22kUifLMAg+Vu0MDmCU0PgvX8UucR2n2o0bnTOFX BciA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683928218; x=1686520218; 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=HXshd51fH2+G3epdXCEAiwTlwyZiu61NCKXGF8cY8aI=; b=LSCFpnpoO6v/9q4E1J3GUVMG1a7wNRGFt+iVZikLWPIJT4tV1JXmc5/TyjALjwSUdp ht1Sln2PBHN/uGFAB7ochIlqbR3iBitJtzFyujHQLHrSv21h2GOGvZWv/PBlxEyypf18 KDkt0/DLuMdT9p7MYfKRha6kR4n+ieiwinvhitcnrRhBDSnnJ5Fmrm2r0rWnKh7c38+j fUcduL/lSqWO3dNrrtgLTeGy8jZT/IyPUFI1GGBWrDReUD0QbOumXVNhLIpFYu+/MfWX 7bxf6q71wtYjzpfz6fEw5uRqGlNMduCX/pgMjtLrcNlKxJB+KCiacAZOt3V32bgWykjs vWkg== X-Gm-Message-State: AC+VfDwdnKa0/Bb7JDc3r6w+8T0YAAwOWxA9tybXvM1BpGt3iXY0QbOY 8ksdgWVtYCKoIGiDEJDkXRhr8g== X-Received: by 2002:a05:6a20:3d95:b0:101:36b8:f077 with SMTP id s21-20020a056a203d9500b0010136b8f077mr18764616pzi.28.1683928218180; Fri, 12 May 2023 14:50:18 -0700 (PDT) Received: from localhost ([135.180.227.0]) by smtp.gmail.com with ESMTPSA id 21-20020aa79115000000b006348cb791f4sm7503301pfh.192.2023.05.12.14.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 14:50:17 -0700 (PDT) Date: Fri, 12 May 2023 14:50:17 -0700 (PDT) X-Google-Original-Date: Fri, 12 May 2023 14:50:14 PDT (-0700) Subject: Re: [PATCH 0/3] riscv: sbi: Switch to the sys-off handler API In-Reply-To: CC: samuel@sholland.org, dmitry.osipenko@collabora.com, rafael.j.wysocki@intel.com, 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: Conor Dooley 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 10:30:11 PST (-0800), Conor Dooley wrote: > 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. >> >> 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 > > 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 Acked-by: Palmer Dabbelt in case the reboot folks want to take these. I'm also happy to take the reboot change through the RISC-V tree with an Ack. There's some discussion about this in the previous patches. > > Thanks, > Conor.