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 33432C433F5 for ; Thu, 3 Feb 2022 10:47:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241811AbiBCKrX (ORCPT ); Thu, 3 Feb 2022 05:47:23 -0500 Received: from foss.arm.com ([217.140.110.172]:38186 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230516AbiBCKrW (ORCPT ); Thu, 3 Feb 2022 05:47:22 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3FD98113E; Thu, 3 Feb 2022 02:47:22 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.89.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 434513F774; Thu, 3 Feb 2022 02:47:21 -0800 (PST) Date: Thu, 3 Feb 2022 10:47:13 +0000 From: Mark Rutland To: Florian Fainelli Cc: linux-arm-kernel@lists.infradead.org, "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Lorenzo Pieralisi , open list Subject: Re: [PATCH 0/4] Broadcom STB PM PSCI extensions Message-ID: References: <20220122035421.4086618-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220122035421.4086618-1-f.fainelli@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 21, 2022 at 07:54:17PM -0800, Florian Fainelli wrote: > Hi all, Hi Florian, > This patch series contains the Broadcom STB PSCI extensions which adds > some additional functions on top of the existing standard PSCI interface > which is the reason for having the driver implement a custom > suspend_ops. I *really* don't like the idea of having non-standard PSCI extensions, because it somewhat defeats the point of PSCI being a standard, and opens the door for the zoo of mechanisms we had on 32-bit. I think this needs a fair amount more explanation and justification. > These platforms have traditionally supported a mode that is akin to > ACPI's S2 with the CPU in WFI and all of the chip being clock gated > which is entered with "echo standby > /sys/power/state". Additional a > true suspend to DRAM as defined in ACPI by S3 is implemented with "echo > mem > /sys/power/state". Why isn't a combination of CPU_SUSPEND and SYSTEM_SUSPEND sufficient here? What specifically *can't* you do with standard PSCI calls? > These platforms also may have an external Broadcom PMIC chip which can > cause the SoC to be powercycled assuming that we communicate that intent > via a vendor specific PSCI SYSTEM_RESET2. > > Since it is desirable to get any new functionality added to the kernel > to be loadable as a module as part of shipping said products in a Google > Kernel Image (GKI) environment, we need to export a couple of symbols from > drivers/firmware/psci/psci.c. I really don't want to export the guts of psci.c. Thanks, Mark. > Thanks for your feedback. > > Florian Fainelli (4): > firmware: psci: Export a couple of suspend symbols > soc: bcm: brcmstb: Make legacy PM code depend on !ARM_PSCI_FW > soc: bcm: brcmstb: Added support for PSCI system suspend operations > Documentation: ABI: Document Broadcom STB PSCI firmware files > > .../ABI/testing/sysfs-firmware-brcmstb | 16 + > drivers/firmware/psci/psci.c | 9 +- > drivers/soc/bcm/brcmstb/Kconfig | 4 +- > drivers/soc/bcm/brcmstb/pm/Makefile | 3 + > drivers/soc/bcm/brcmstb/pm/pm-psci.c | 315 ++++++++++++++++++ > include/linux/psci.h | 2 + > include/linux/soc/brcmstb/brcmstb-smccc.h | 84 +++++ > 7 files changed, 430 insertions(+), 3 deletions(-) > create mode 100644 Documentation/ABI/testing/sysfs-firmware-brcmstb > create mode 100644 drivers/soc/bcm/brcmstb/pm/pm-psci.c > create mode 100644 include/linux/soc/brcmstb/brcmstb-smccc.h > > -- > 2.25.1 > 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81D8CC433EF for ; Thu, 3 Feb 2022 10:48:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=B6bNOFZlEgQsobq20i/uhNZ59Ap5Fu017Mb3A1PsUek=; b=eldSYAZ+Xec0kY TlECXSWv462IxXE7ZxNdnTXXO9IRV7idJ2/1HLj37OBK+CkFWsBlqpPfYu0SKntsohp7vIlH1ZvZX jM7VQvwtgCzkG60x+JzEajMbTIDN/wvLNgbrB8lU5lFJPnMfs5Ur4J5zejLZR0Cb3CuWOUJclK8jm UnTkB4arFZG8S2pURA/Yqw92Dpj91s8n0Mq6f7TZMCXOaspVvh+EC6yBe6OjjHpaw2MajyvNbvSTD ppyAff+g4WJnAoZgw08MeCLNvHlr+aS7e3qh40XBJmzJ05A3BGvws6mPbyHnvCmas1DZ5SwOH122R XDhPLsk8Q8hFT3vULM2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFZeB-000qhw-BQ; Thu, 03 Feb 2022 10:47:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFZe7-000qgs-L8 for linux-arm-kernel@lists.infradead.org; Thu, 03 Feb 2022 10:47:25 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3FD98113E; Thu, 3 Feb 2022 02:47:22 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.89.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 434513F774; Thu, 3 Feb 2022 02:47:21 -0800 (PST) Date: Thu, 3 Feb 2022 10:47:13 +0000 From: Mark Rutland To: Florian Fainelli Cc: linux-arm-kernel@lists.infradead.org, "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , Lorenzo Pieralisi , open list Subject: Re: [PATCH 0/4] Broadcom STB PM PSCI extensions Message-ID: References: <20220122035421.4086618-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220122035421.4086618-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220203_024723_768979_3C1EBB7D X-CRM114-Status: GOOD ( 22.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jan 21, 2022 at 07:54:17PM -0800, Florian Fainelli wrote: > Hi all, Hi Florian, > This patch series contains the Broadcom STB PSCI extensions which adds > some additional functions on top of the existing standard PSCI interface > which is the reason for having the driver implement a custom > suspend_ops. I *really* don't like the idea of having non-standard PSCI extensions, because it somewhat defeats the point of PSCI being a standard, and opens the door for the zoo of mechanisms we had on 32-bit. I think this needs a fair amount more explanation and justification. > These platforms have traditionally supported a mode that is akin to > ACPI's S2 with the CPU in WFI and all of the chip being clock gated > which is entered with "echo standby > /sys/power/state". Additional a > true suspend to DRAM as defined in ACPI by S3 is implemented with "echo > mem > /sys/power/state". Why isn't a combination of CPU_SUSPEND and SYSTEM_SUSPEND sufficient here? What specifically *can't* you do with standard PSCI calls? > These platforms also may have an external Broadcom PMIC chip which can > cause the SoC to be powercycled assuming that we communicate that intent > via a vendor specific PSCI SYSTEM_RESET2. > > Since it is desirable to get any new functionality added to the kernel > to be loadable as a module as part of shipping said products in a Google > Kernel Image (GKI) environment, we need to export a couple of symbols from > drivers/firmware/psci/psci.c. I really don't want to export the guts of psci.c. Thanks, Mark. > Thanks for your feedback. > > Florian Fainelli (4): > firmware: psci: Export a couple of suspend symbols > soc: bcm: brcmstb: Make legacy PM code depend on !ARM_PSCI_FW > soc: bcm: brcmstb: Added support for PSCI system suspend operations > Documentation: ABI: Document Broadcom STB PSCI firmware files > > .../ABI/testing/sysfs-firmware-brcmstb | 16 + > drivers/firmware/psci/psci.c | 9 +- > drivers/soc/bcm/brcmstb/Kconfig | 4 +- > drivers/soc/bcm/brcmstb/pm/Makefile | 3 + > drivers/soc/bcm/brcmstb/pm/pm-psci.c | 315 ++++++++++++++++++ > include/linux/psci.h | 2 + > include/linux/soc/brcmstb/brcmstb-smccc.h | 84 +++++ > 7 files changed, 430 insertions(+), 3 deletions(-) > create mode 100644 Documentation/ABI/testing/sysfs-firmware-brcmstb > create mode 100644 drivers/soc/bcm/brcmstb/pm/pm-psci.c > create mode 100644 include/linux/soc/brcmstb/brcmstb-smccc.h > > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel