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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 186CCC31E40 for ; Tue, 6 Aug 2019 16:10:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB38320679 for ; Tue, 6 Aug 2019 16:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387647AbfHFQKi (ORCPT ); Tue, 6 Aug 2019 12:10:38 -0400 Received: from foss.arm.com ([217.140.110.172]:36094 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732203AbfHFQKh (ORCPT ); Tue, 6 Aug 2019 12:10:37 -0400 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 EF139344; Tue, 6 Aug 2019 09:10:36 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 996D33F575; Tue, 6 Aug 2019 09:10:35 -0700 (PDT) Date: Tue, 6 Aug 2019 17:10:33 +0100 From: Sudeep Holla To: Lorenzo Pieralisi Cc: linux-pm@vger.kernel.org, Ulf Hansson , Daniel Lezcano , Mark Rutland , "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , LKML , LAKML Subject: Re: [PATCH 4/6] ARM: psci: cpuidle: Introduce PSCI CPUidle driver Message-ID: <20190806161033.GD16546@e107155-lin> References: <20190722153745.32446-1-lorenzo.pieralisi@arm.com> <20190722153745.32446-5-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190722153745.32446-5-lorenzo.pieralisi@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 04:37:43PM +0100, Lorenzo Pieralisi wrote: > PSCI firmware is the standard power management control for > all ARM64 based platforms and it is also deployed on some > ARM 32 bit platforms to date. > > Idle state entry in PSCI is currently achieved by calling > arm_cpuidle_init() and arm_cpuidle_suspend() in a generic > idle driver, which in turn relies on ARM/ARM64 CPUidle back-end > to relay the call into PSCI firmware if PSCI is the boot method. > > Given that PSCI is the standard idle entry method on ARM64 systems > (which means that no other CPUidle driver are expected on ARM64 > platforms - so PSCI is already a generic idle driver), in order to > simplify idle entry and code maintenance, it makes sense to have a PSCI > specific idle driver so that idle code that it is currently living in > drivers/firmware directory can be hoisted out of it and moved > where it belongs, into a full-fledged PSCI driver, leaving PSCI code > in drivers/firmware as a pure firmware interface, as it should be. > > Implement a PSCI CPUidle driver. By default it is a silent Kconfig entry > which is left unselected, since it selection would clash with the > generic ARM CPUidle driver that provides a PSCI based idle driver > through the arm/arm64 arches back-ends CPU operations. > > Signed-off-by: Lorenzo Pieralisi > Cc: Ulf Hansson > Cc: Sudeep Holla Once the error path issues pointed by Ulf are resolved, Reviewed-by: Sudeep Holla > Cc: Daniel Lezcano > Cc: Mark Rutland > Cc: "Rafael J. Wysocki" > --- > MAINTAINERS | 8 ++ > drivers/cpuidle/Kconfig.arm | 3 + > drivers/cpuidle/Makefile | 1 + > drivers/cpuidle/cpuidle-psci.c | 150 +++++++++++++++++++++++++++++++++ > 4 files changed, 162 insertions(+) > create mode 100644 drivers/cpuidle/cpuidle-psci.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 783569e3c4b4..c2bf8ce65e83 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -4286,6 +4286,14 @@ S: Supported > F: drivers/cpuidle/cpuidle-exynos.c > F: arch/arm/mach-exynos/pm.c > > +CPUIDLE DRIVER - ARM PSCI > +M: Lorenzo Pieralisi > +M: Sudeep Holla > +L: linux-pm@vger.kernel.org > +L: linux-arm-kernel@lists.infradead.org > +S: Supported > +F: drivers/cpuidle/cpuidle-psci.c > + > CPU IDLE TIME MANAGEMENT FRAMEWORK > M: "Rafael J. Wysocki" > M: Daniel Lezcano > diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm > index 48cb3d4bb7d1..929b57424ea4 100644 > --- a/drivers/cpuidle/Kconfig.arm > +++ b/drivers/cpuidle/Kconfig.arm > @@ -13,6 +13,9 @@ config ARM_CPUIDLE > initialized by calling the CPU operations init idle hook > provided by architecture code. > > +config ARM_PSCI_CPUIDLE > + bool > + [nit] I understand the intention to keep it hidden, but can't we have the dependency and selection of other config as part of this patch to make it more complete ? -- Regards, Sudeep 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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D2CEC31E40 for ; Tue, 6 Aug 2019 16:10:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6002020679 for ; Tue, 6 Aug 2019 16:10:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="K155y6sM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6002020679 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=8lPVAD4U8U0ShMqdIkNUjm9nxtPkKfItkRY4LY/mHzM=; b=K155y6sMgpkiOA 8RbwgmkzdwHEDgwjebOFOnhxh/UUGZ69T/tHa6olb90f/nALWmIykcjOEtV93C5djrmGIyHbOyvdU PQUBcMfnFeq37YnjNGVcTlUSPk+vcUiaDe3ItguNR4UxtHdBpLsqR1qQvhmygcdBpbf60g36Jmfsg xW78RNM5aDYRdtc1lxKvW84PdPE2Yn6MKBWCCmkSGKTx/titzaO6hPHPsdKLqlkYIdDTVT+TNHpVX BArdasFTNajmUGYw1ze9FF2I9om/Ot5tGNJ8AlOrbOaj6kNS/GlKXe1x6WBeAXunlx9KHfBMbiiPJ L+oIWPxx3zsd/imQGcTA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hv22r-0002mS-Kp; Tue, 06 Aug 2019 16:10:41 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hv22n-0002lc-Py for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2019 16:10:39 +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 EF139344; Tue, 6 Aug 2019 09:10:36 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 996D33F575; Tue, 6 Aug 2019 09:10:35 -0700 (PDT) Date: Tue, 6 Aug 2019 17:10:33 +0100 From: Sudeep Holla To: Lorenzo Pieralisi Subject: Re: [PATCH 4/6] ARM: psci: cpuidle: Introduce PSCI CPUidle driver Message-ID: <20190806161033.GD16546@e107155-lin> References: <20190722153745.32446-1-lorenzo.pieralisi@arm.com> <20190722153745.32446-5-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190722153745.32446-5-lorenzo.pieralisi@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190806_091037_930669_FE5BC929 X-CRM114-Status: GOOD ( 23.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Ulf Hansson , linux-pm@vger.kernel.org, Catalin Marinas , Daniel Lezcano , "Rafael J. Wysocki" , LKML , Will Deacon , LAKML Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 22, 2019 at 04:37:43PM +0100, Lorenzo Pieralisi wrote: > PSCI firmware is the standard power management control for > all ARM64 based platforms and it is also deployed on some > ARM 32 bit platforms to date. > > Idle state entry in PSCI is currently achieved by calling > arm_cpuidle_init() and arm_cpuidle_suspend() in a generic > idle driver, which in turn relies on ARM/ARM64 CPUidle back-end > to relay the call into PSCI firmware if PSCI is the boot method. > > Given that PSCI is the standard idle entry method on ARM64 systems > (which means that no other CPUidle driver are expected on ARM64 > platforms - so PSCI is already a generic idle driver), in order to > simplify idle entry and code maintenance, it makes sense to have a PSCI > specific idle driver so that idle code that it is currently living in > drivers/firmware directory can be hoisted out of it and moved > where it belongs, into a full-fledged PSCI driver, leaving PSCI code > in drivers/firmware as a pure firmware interface, as it should be. > > Implement a PSCI CPUidle driver. By default it is a silent Kconfig entry > which is left unselected, since it selection would clash with the > generic ARM CPUidle driver that provides a PSCI based idle driver > through the arm/arm64 arches back-ends CPU operations. > > Signed-off-by: Lorenzo Pieralisi > Cc: Ulf Hansson > Cc: Sudeep Holla Once the error path issues pointed by Ulf are resolved, Reviewed-by: Sudeep Holla > Cc: Daniel Lezcano > Cc: Mark Rutland > Cc: "Rafael J. Wysocki" > --- > MAINTAINERS | 8 ++ > drivers/cpuidle/Kconfig.arm | 3 + > drivers/cpuidle/Makefile | 1 + > drivers/cpuidle/cpuidle-psci.c | 150 +++++++++++++++++++++++++++++++++ > 4 files changed, 162 insertions(+) > create mode 100644 drivers/cpuidle/cpuidle-psci.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 783569e3c4b4..c2bf8ce65e83 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -4286,6 +4286,14 @@ S: Supported > F: drivers/cpuidle/cpuidle-exynos.c > F: arch/arm/mach-exynos/pm.c > > +CPUIDLE DRIVER - ARM PSCI > +M: Lorenzo Pieralisi > +M: Sudeep Holla > +L: linux-pm@vger.kernel.org > +L: linux-arm-kernel@lists.infradead.org > +S: Supported > +F: drivers/cpuidle/cpuidle-psci.c > + > CPU IDLE TIME MANAGEMENT FRAMEWORK > M: "Rafael J. Wysocki" > M: Daniel Lezcano > diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm > index 48cb3d4bb7d1..929b57424ea4 100644 > --- a/drivers/cpuidle/Kconfig.arm > +++ b/drivers/cpuidle/Kconfig.arm > @@ -13,6 +13,9 @@ config ARM_CPUIDLE > initialized by calling the CPU operations init idle hook > provided by architecture code. > > +config ARM_PSCI_CPUIDLE > + bool > + [nit] I understand the intention to keep it hidden, but can't we have the dependency and selection of other config as part of this patch to make it more complete ? -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel