From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [PATCH v3 2/2] ARM64: kernel: PSCI: move PSCI idle management code to drivers/firmware Date: Tue, 5 Jan 2016 10:59:01 +0000 Message-ID: <20160105105900.GT19062@n2100.arm.linux.org.uk> References: <1445011379-8787-1-git-send-email-lorenzo.pieralisi@arm.com> <1445011379-8787-3-git-send-email-lorenzo.pieralisi@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from pandora.arm.linux.org.uk ([78.32.30.218]:41763 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752300AbcAEK7R (ORCPT ); Tue, 5 Jan 2016 05:59:17 -0500 Content-Disposition: inline In-Reply-To: <1445011379-8787-3-git-send-email-lorenzo.pieralisi@arm.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Lorenzo Pieralisi Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Will Deacon , Sudeep Holla , Daniel Lezcano , Catalin Marinas , Mark Rutland , Jisheng Zhang On Fri, Oct 16, 2015 at 05:02:59PM +0100, Lorenzo Pieralisi wrote: > ARM64 PSCI kernel interfaces that initialize idle states and implement > the suspend API to enter them are generic and can be shared with the > ARM architecture. > > To achieve that goal, this patch moves ARM64 PSCI idle management > code to drivers/firmware, so that the interface to initialize and > enter idle states can actually be shared by ARM and ARM64 arches > back-ends. > > The ARM generic CPUidle implementation also requires the definition of > a cpuidle_ops section entry for the kernel to initialize the CPUidle > operations at boot based on the enable-method (ie ARM64 has the > statically initialized cpu_ops counterparts for that purpose); therefore > this patch also adds the required section entry on CONFIG_ARM for PSCI so > that the kernel can initialize the PSCI CPUidle back-end when PSCI is > the probed enable-method. > > On ARM64 this patch provides no functional change. On ARM64, it causes build breakage though: drivers/built-in.o: In function `psci_suspend_finisher': arm_pmu.c:(.text+0xc6494): undefined reference to `cpu_resume' arm_pmu.c:(.text+0xc6498): undefined reference to `cpu_resume' drivers/built-in.o: In function `psci_cpu_suspend_enter': arm_pmu.c:(.text+0xc66c0): undefined reference to `cpu_suspend' The code which has been moved looks similar. However, when it lived in arch/arm64/kernel/psci.c, it was protected by #ifdef CONFIG_HOTPLUG_CPU. In its new location, there are no ifdefs around it, and so if it gets built without CONFIG_ARM_CPU_SUSPEND on ARM, or CONFIG_CPU_PM for ARM64, it will error out like the above. As this is causing a regression, and I've now closed my tree, I will be doing what I said yesterday: I'll be dropping this patch for this merge window in order to stabilise my tree. Sorry. -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@arm.linux.org.uk (Russell King - ARM Linux) Date: Tue, 5 Jan 2016 10:59:01 +0000 Subject: [PATCH v3 2/2] ARM64: kernel: PSCI: move PSCI idle management code to drivers/firmware In-Reply-To: <1445011379-8787-3-git-send-email-lorenzo.pieralisi@arm.com> References: <1445011379-8787-1-git-send-email-lorenzo.pieralisi@arm.com> <1445011379-8787-3-git-send-email-lorenzo.pieralisi@arm.com> Message-ID: <20160105105900.GT19062@n2100.arm.linux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Oct 16, 2015 at 05:02:59PM +0100, Lorenzo Pieralisi wrote: > ARM64 PSCI kernel interfaces that initialize idle states and implement > the suspend API to enter them are generic and can be shared with the > ARM architecture. > > To achieve that goal, this patch moves ARM64 PSCI idle management > code to drivers/firmware, so that the interface to initialize and > enter idle states can actually be shared by ARM and ARM64 arches > back-ends. > > The ARM generic CPUidle implementation also requires the definition of > a cpuidle_ops section entry for the kernel to initialize the CPUidle > operations at boot based on the enable-method (ie ARM64 has the > statically initialized cpu_ops counterparts for that purpose); therefore > this patch also adds the required section entry on CONFIG_ARM for PSCI so > that the kernel can initialize the PSCI CPUidle back-end when PSCI is > the probed enable-method. > > On ARM64 this patch provides no functional change. On ARM64, it causes build breakage though: drivers/built-in.o: In function `psci_suspend_finisher': arm_pmu.c:(.text+0xc6494): undefined reference to `cpu_resume' arm_pmu.c:(.text+0xc6498): undefined reference to `cpu_resume' drivers/built-in.o: In function `psci_cpu_suspend_enter': arm_pmu.c:(.text+0xc66c0): undefined reference to `cpu_suspend' The code which has been moved looks similar. However, when it lived in arch/arm64/kernel/psci.c, it was protected by #ifdef CONFIG_HOTPLUG_CPU. In its new location, there are no ifdefs around it, and so if it gets built without CONFIG_ARM_CPU_SUSPEND on ARM, or CONFIG_CPU_PM for ARM64, it will error out like the above. As this is causing a regression, and I've now closed my tree, I will be doing what I said yesterday: I'll be dropping this patch for this merge window in order to stabilise my tree. Sorry. -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.