Re: [GIT PULL 3/3] 3rd Round of Exynos-PM-2 Updates for v3.18
Hi, On Thursday, October 02, 2014 03:35:18 PM Bartlomiej Zolnierkiewicz wrote: Hi, On Wednesday, October 01, 2014 08:31:47 PM Arnd Bergmann wrote: On Wednesday 01 October 2014 18:49:20 Bartlomiej Zolnierkiewicz wrote: On Wednesday, October 01, 2014 06:01:29 PM Arnd Bergmann wrote: On Thursday 25 September 2014, Kukjin Kim wrote: Exynos 2nd PM related updates for v3.18 - Firmware supporting suspend and resume to excute of low level operations to enter and leave power mode for exynos : introduce suspend() and resume() firmware operations - Fix AFTR mode on boards with secure firmware enabled and allows exynos cpuidle driver usage on exynos4x12 SoCs - Fix build with PM_SLEEP=n and ARM_EXYNOS_CPUIDLE=y - SWRESET is needed to boot secondary CPU on exynos3250 I needed another fixup to make this build, but I'm not sure about whether this is the right solution. Could you please share the build errors and the used config? I'm building with an additional series that works around all known build failures in randconfig, so it's possible that the configuration causes other problems in your tree, or that one of my own patches introduces the problem and the exynos tree by itself is fine. This is the build error I get: arch/arm/mach-exynos/built-in.o: In function `exynos_suspend': :(.text+0x294): undefined reference to `cpu_suspend' :(.text+0x29c): undefined reference to `cpu_suspend' arch/arm/mach-exynos/built-in.o: In function `skip_cp15': :(.data+0x58): undefined reference to `cpu_resume' arch/arm/mach-exynos/built-in.o: In function `cp15_save_power': :(.data+0x70): undefined reference to `cpu_resume' The defconfig file is attached, the details don't matter to other readers, except that it has CONFIG_ARM_CPU_SUSPEND disabled, which means that sleep.S can't be linked properly. It turned out that the breakage came through Exynos tree. ARM: EXYNOS: Add support for firmware-assisted suspend/resume added to arch/arm/mach-exynos/firmware.c new references to functions from arch/arm/mach-exynos/sleep.S causing the CONFIG_PM_SLEEP=n build breakage. Then ARM: EXYNOS: Fix build with PM_SLEEP=n and ARM_EXYNOS_CPUIDLE=y tried to fix the CONFIG_PM_SLEEP=n issue by always building sleep.S causing in turn the CONFIG_ARM_CPU_SUSPEND=n build breakage. I have not noticed the problem earlier because I have overlooked the fact that cpu_suspend() is available only when CONFIG_ARM_CPU_SUSPEND=y and in all configs tested by me it was on (it gets disabled only when both CONFIG_PM and CONFIG_MCPM are off). Sorry for that. Your patch seems to be a correct fix except that the resume entry should use IS_ENABLED(CONFIG_EXYNOS_CPU_SUSPEND) instead of IS_ENABLED(CONFIG_PM_SLEEP) as resume firmware operations is also used by Exynos cpuidle support. How should we proceed further to get this tree merged? ping? Arnd, Kukjin? PS What is interesting in your defconfig is that it has CONFIG_MCPM enabled but CONFIG_ARM_CPU_SUSPEND is disabled so there are probably some MPCM related changes in your tree. Best regards, -- Bartlomiej Zolnierkiewicz Samsung RD Institute Poland Samsung Electronics -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL 3/3] 3rd Round of Exynos-PM-2 Updates for v3.18
Hi, On Wednesday, October 01, 2014 08:31:47 PM Arnd Bergmann wrote: On Wednesday 01 October 2014 18:49:20 Bartlomiej Zolnierkiewicz wrote: On Wednesday, October 01, 2014 06:01:29 PM Arnd Bergmann wrote: On Thursday 25 September 2014, Kukjin Kim wrote: Exynos 2nd PM related updates for v3.18 - Firmware supporting suspend and resume to excute of low level operations to enter and leave power mode for exynos : introduce suspend() and resume() firmware operations - Fix AFTR mode on boards with secure firmware enabled and allows exynos cpuidle driver usage on exynos4x12 SoCs - Fix build with PM_SLEEP=n and ARM_EXYNOS_CPUIDLE=y - SWRESET is needed to boot secondary CPU on exynos3250 I needed another fixup to make this build, but I'm not sure about whether this is the right solution. Could you please share the build errors and the used config? I'm building with an additional series that works around all known build failures in randconfig, so it's possible that the configuration causes other problems in your tree, or that one of my own patches introduces the problem and the exynos tree by itself is fine. This is the build error I get: arch/arm/mach-exynos/built-in.o: In function `exynos_suspend': :(.text+0x294): undefined reference to `cpu_suspend' :(.text+0x29c): undefined reference to `cpu_suspend' arch/arm/mach-exynos/built-in.o: In function `skip_cp15': :(.data+0x58): undefined reference to `cpu_resume' arch/arm/mach-exynos/built-in.o: In function `cp15_save_power': :(.data+0x70): undefined reference to `cpu_resume' The defconfig file is attached, the details don't matter to other readers, except that it has CONFIG_ARM_CPU_SUSPEND disabled, which means that sleep.S can't be linked properly. It turned out that the breakage came through Exynos tree. ARM: EXYNOS: Add support for firmware-assisted suspend/resume added to arch/arm/mach-exynos/firmware.c new references to functions from arch/arm/mach-exynos/sleep.S causing the CONFIG_PM_SLEEP=n build breakage. Then ARM: EXYNOS: Fix build with PM_SLEEP=n and ARM_EXYNOS_CPUIDLE=y tried to fix the CONFIG_PM_SLEEP=n issue by always building sleep.S causing in turn the CONFIG_ARM_CPU_SUSPEND=n build breakage. I have not noticed the problem earlier because I have overlooked the fact that cpu_suspend() is available only when CONFIG_ARM_CPU_SUSPEND=y and in all configs tested by me it was on (it gets disabled only when both CONFIG_PM and CONFIG_MCPM are off). Sorry for that. Your patch seems to be a correct fix except that the resume entry should use IS_ENABLED(CONFIG_EXYNOS_CPU_SUSPEND) instead of IS_ENABLED(CONFIG_PM_SLEEP) as resume firmware operations is also used by Exynos cpuidle support. How should we proceed further to get this tree merged? PS What is interesting in your defconfig is that it has CONFIG_MCPM enabled but CONFIG_ARM_CPU_SUSPEND is disabled so there are probably some MPCM related changes in your tree. Best regards, -- Bartlomiej Zolnierkiewicz Samsung RD Institute Poland Samsung Electronics -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL 3/3] 3rd Round of Exynos-PM-2 Updates for v3.18
On Thursday 25 September 2014, Kukjin Kim wrote: Exynos 2nd PM related updates for v3.18 - Firmware supporting suspend and resume to excute of low level operations to enter and leave power mode for exynos : introduce suspend() and resume() firmware operations - Fix AFTR mode on boards with secure firmware enabled and allows exynos cpuidle driver usage on exynos4x12 SoCs - Fix build with PM_SLEEP=n and ARM_EXYNOS_CPUIDLE=y - SWRESET is needed to boot secondary CPU on exynos3250 I needed another fixup to make this build, but I'm not sure about whether this is the right solution. I decided not to pull this one, please test again with and without my patch for the case that ARM_CPU_SUSPEND is disabled. Arnd diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 64324bf5edb4..aaab67d84bf6 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -14,9 +14,9 @@ obj- := # Core -obj-$(CONFIG_ARCH_EXYNOS) += exynos.o pmu.o exynos-smc.o firmware.o sleep.o +obj-$(CONFIG_ARCH_EXYNOS) += exynos.o pmu.o exynos-smc.o firmware.o -obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o +obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o obj-$(CONFIG_PM_SLEEP) += suspend.o obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index 2c5bc6bfcbdf..b7ff8f25bf4a 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -129,11 +129,11 @@ static int exynos_resume(void) } static const struct firmware_ops exynos_firmware_ops = { - .do_idle= exynos_do_idle, + .do_idle= IS_ENABLED(CONFIG_EXYNOS_CPU_SUSPEND) ? exynos_do_idle : NULL, .set_cpu_boot_addr = exynos_set_cpu_boot_addr, .cpu_boot = exynos_cpu_boot, - .suspend= exynos_suspend, - .resume = exynos_resume, + .suspend= IS_ENABLED(CONFIG_PM_SLEEP) ? exynos_suspend : NULL, + .resume = IS_ENABLED(CONFIG_PM_SLEEP) ? exynos_resume : NULL, }; void __init exynos_firmware_init(void) -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL 3/3] 3rd Round of Exynos-PM-2 Updates for v3.18
Hi, On Wednesday, October 01, 2014 06:01:29 PM Arnd Bergmann wrote: On Thursday 25 September 2014, Kukjin Kim wrote: Exynos 2nd PM related updates for v3.18 - Firmware supporting suspend and resume to excute of low level operations to enter and leave power mode for exynos : introduce suspend() and resume() firmware operations - Fix AFTR mode on boards with secure firmware enabled and allows exynos cpuidle driver usage on exynos4x12 SoCs - Fix build with PM_SLEEP=n and ARM_EXYNOS_CPUIDLE=y - SWRESET is needed to boot secondary CPU on exynos3250 I needed another fixup to make this build, but I'm not sure about whether this is the right solution. Could you please share the build errors and the used config? Best regards, -- Bartlomiej Zolnierkiewicz Samsung RD Institute Poland Samsung Electronics I decided not to pull this one, please test again with and without my patch for the case that ARM_CPU_SUSPEND is disabled. Arnd diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 64324bf5edb4..aaab67d84bf6 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -14,9 +14,9 @@ obj-:= # Core -obj-$(CONFIG_ARCH_EXYNOS)+= exynos.o pmu.o exynos-smc.o firmware.o sleep.o +obj-$(CONFIG_ARCH_EXYNOS)+= exynos.o pmu.o exynos-smc.o firmware.o -obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o +obj-$(CONFIG_EXYNOS_CPU_SUSPEND) += pm.o sleep.o obj-$(CONFIG_PM_SLEEP) += suspend.o obj-$(CONFIG_PM_GENERIC_DOMAINS) += pm_domains.o diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index 2c5bc6bfcbdf..b7ff8f25bf4a 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -129,11 +129,11 @@ static int exynos_resume(void) } static const struct firmware_ops exynos_firmware_ops = { - .do_idle= exynos_do_idle, + .do_idle= IS_ENABLED(CONFIG_EXYNOS_CPU_SUSPEND) ? exynos_do_idle : NULL, .set_cpu_boot_addr = exynos_set_cpu_boot_addr, .cpu_boot = exynos_cpu_boot, - .suspend= exynos_suspend, - .resume = exynos_resume, + .suspend= IS_ENABLED(CONFIG_PM_SLEEP) ? exynos_suspend : NULL, + .resume = IS_ENABLED(CONFIG_PM_SLEEP) ? exynos_resume : NULL, }; void __init exynos_firmware_init(void) -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL 3/3] 3rd Round of Exynos-PM-2 Updates for v3.18
On Wednesday 01 October 2014 18:49:20 Bartlomiej Zolnierkiewicz wrote: On Wednesday, October 01, 2014 06:01:29 PM Arnd Bergmann wrote: On Thursday 25 September 2014, Kukjin Kim wrote: Exynos 2nd PM related updates for v3.18 - Firmware supporting suspend and resume to excute of low level operations to enter and leave power mode for exynos : introduce suspend() and resume() firmware operations - Fix AFTR mode on boards with secure firmware enabled and allows exynos cpuidle driver usage on exynos4x12 SoCs - Fix build with PM_SLEEP=n and ARM_EXYNOS_CPUIDLE=y - SWRESET is needed to boot secondary CPU on exynos3250 I needed another fixup to make this build, but I'm not sure about whether this is the right solution. Could you please share the build errors and the used config? I'm building with an additional series that works around all known build failures in randconfig, so it's possible that the configuration causes other problems in your tree, or that one of my own patches introduces the problem and the exynos tree by itself is fine. This is the build error I get: arch/arm/mach-exynos/built-in.o: In function `exynos_suspend': :(.text+0x294): undefined reference to `cpu_suspend' :(.text+0x29c): undefined reference to `cpu_suspend' arch/arm/mach-exynos/built-in.o: In function `skip_cp15': :(.data+0x58): undefined reference to `cpu_resume' arch/arm/mach-exynos/built-in.o: In function `cp15_save_power': :(.data+0x70): undefined reference to `cpu_resume' The defconfig file is attached, the details don't matter to other readers, except that it has CONFIG_ARM_CPU_SUSPEND disabled, which means that sleep.S can't be linked properly. Arnd# # Automatically generated file; DO NOT EDIT. # Linux/arm 3.17.0-rc6 Kernel Configuration # CONFIG_ARM=y CONFIG_ARM_HAS_SG_CHAIN=y CONFIG_MIGHT_HAVE_PCI=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_NO_IOPORT_MAP=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_BANDGAP=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_VECTORS_BASE=0x CONFIG_PHYS_OFFSET=0x0080 CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config CONFIG_CONSTRUCTORS=y CONFIG_IRQ_WORK=y # # General setup # CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE= # CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION= # CONFIG_LOCALVERSION_AUTO is not set CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=y CONFIG_HAVE_KERNEL_LZ4=y # CONFIG_KERNEL_GZIP is not set CONFIG_KERNEL_LZMA=y # CONFIG_KERNEL_XZ is not set # CONFIG_KERNEL_LZO is not set # CONFIG_KERNEL_LZ4 is not set CONFIG_DEFAULT_HOSTNAME=(none) # CONFIG_SYSVIPC is not set CONFIG_FHANDLE=y # CONFIG_USELIB is not set # # IRQ subsystem # CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_IRQ_DOMAIN=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_IRQ_DOMAIN_DEBUG=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_ARCH_HAS_TICK_BROADCAST=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y # # Timers subsystem # CONFIG_HZ_PERIODIC=y # CONFIG_NO_HZ_IDLE is not set # CONFIG_NO_HZ_FULL is not set CONFIG_NO_HZ=y # CONFIG_HIGH_RES_TIMERS is not set # # CPU/Task time and stats accounting # CONFIG_VIRT_CPU_ACCOUNTING=y # CONFIG_TICK_CPU_ACCOUNTING is not set CONFIG_VIRT_CPU_ACCOUNTING_GEN=y # CONFIG_IRQ_TIME_ACCOUNTING is not set # CONFIG_BSD_PROCESS_ACCT is not set # # RCU Subsystem # CONFIG_TREE_RCU=y # CONFIG_PREEMPT_RCU is not set CONFIG_TASKS_RCU=y CONFIG_RCU_STALL_COMMON=y CONFIG_CONTEXT_TRACKING=y CONFIG_RCU_USER_QS=y # CONFIG_CONTEXT_TRACKING_FORCE is not set CONFIG_RCU_FANOUT=32 CONFIG_RCU_FANOUT_LEAF=16 CONFIG_RCU_FANOUT_EXACT=y # CONFIG_TREE_RCU_TRACE is not set # CONFIG_RCU_NOCB_CPU is not set # CONFIG_BUILD_BIN2C is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=17 CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 CONFIG_GENERIC_SCHED_CLOCK=y # CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set # CONFIG_NAMESPACES is not set # CONFIG_SCHED_AUTOGROUP is not set CONFIG_SYSFS_DEPRECATED=y CONFIG_SYSFS_DEPRECATED_V2=y CONFIG_RELAY=y CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE= CONFIG_RD_GZIP=y CONFIG_RD_BZIP2=y CONFIG_RD_LZMA=y CONFIG_RD_XZ=y # CONFIG_RD_LZO is not set CONFIG_RD_LZ4=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_ANON_INODES=y CONFIG_HAVE_UID16=y CONFIG_EXPERT=y CONFIG_UID16=y CONFIG_SGETMASK_SYSCALL=y CONFIG_SYSFS_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y # CONFIG_PRINTK is not set # CONFIG_BUG is not set CONFIG_ELF_CORE=y # CONFIG_BASE_FULL is not set CONFIG_FUTEX=y CONFIG_EPOLL=y # CONFIG_SIGNALFD is not set CONFIG_TIMERFD=y CONFIG_EVENTFD=y # CONFIG_AIO is not set # CONFIG_ADVISE_SYSCALLS is not set # CONFIG_EMBEDDED
[GIT PULL 3/3] 3rd Round of Exynos-PM-2 Updates for v3.18
The following changes since commit c3294253713cbc96df59a7cc6a9a3fc0c4ae5ba7: ARM: EXYNOS: Refactor the pm code to use DT based lookup (2014-09-24 16:45:14 +0900) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git tags/exynos-pm-2 for you to fetch changes up to cd925eee6acf7c742a896e0d43ad4f4088bb691c: ARM: EXYNOS: SWRESET is needed to boot secondary CPU on exynos3250 (2014-09-25 18:15:13 +0900) Exynos 2nd PM related updates for v3.18 - Firmware supporting suspend and resume to excute of low level operations to enter and leave power mode for exynos : introduce suspend() and resume() firmware operations - Fix AFTR mode on boards with secure firmware enabled and allows exynos cpuidle driver usage on exynos4x12 SoCs - Fix build with PM_SLEEP=n and ARM_EXYNOS_CPUIDLE=y - SWRESET is needed to boot secondary CPU on exynos3250 Bartlomiej Zolnierkiewicz (6): ARM: EXYNOS: replace EXYNOS_BOOT_VECTOR_* macros by static inlines ARM: firmware: add AFTR mode support to firmware do_idle method ARM: EXYNOS: add secure firmware support to AFTR mode code ARM: EXYNOS: fix register setup for AFTR mode code ARM: EXYNOS: allow driver usage on Exynos4x12 SoCs ARM: EXYNOS: Fix build with PM_SLEEP=n and ARM_EXYNOS_CPUIDLE=y Krzysztof Kozlowski (1): ARM: EXYNOS: SWRESET is needed to boot secondary CPU on exynos3250 Tomasz Figa (2): ARM: firmware: Introduce suspend and resume operations ARM: EXYNOS: Add support for firmware-assisted suspend/resume Documentation/arm/firmware.txt | 28 +-- arch/arm/include/asm/firmware.h| 10 +- arch/arm/mach-exynos/Kconfig | 5 + arch/arm/mach-exynos/Makefile | 6 +- arch/arm/mach-exynos/common.h | 13 ++ arch/arm/mach-exynos/exynos.c | 5 +- arch/arm/mach-exynos/firmware.c| 65 +- arch/arm/mach-exynos/platsmp.c | 23 ++ arch/arm/mach-exynos/pm.c | 388 - arch/arm/mach-exynos/regs-pmu.h| 2 + arch/arm/mach-exynos/sleep.S | 28 +++ arch/arm/mach-exynos/smc.h | 4 + arch/arm/mach-exynos/suspend.c | 356 ++ arch/arm/mach-tegra/cpuidle-tegra114.c | 2 +- arch/arm/plat-samsung/Makefile | 1 + 15 files changed, 557 insertions(+), 379 deletions(-) create mode 100644 arch/arm/mach-exynos/suspend.c -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html