Skip to contentSkip to conversation

ARM: Suspend: Fix build error on ARCH_S5PC100

PATCH New Kukjin Kim 3 participants 12 messages Apr 2, 2011 – May 16, 2011

Subsystems (2)
lore
Share & tools
lore

Kukjin Kim

author
#0 lore raw

PATCH 1/1 ARM: Suspend: Fix build error on ARCH_S5PC100

The current mainline codes of ARCH_S5PC100 can not support suspend to ram. So needs this for preventing build error.

---
Oops, I missed this in my previous patch.

As I know, firstly ARCH_S5P64X0 will support suspend to ram then ARCH_S5PC100 will do it. But right now, we need this.

 arch/arm/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/Kconfig +1 -1
index 7c0effb..5c3e232 100644
@@ -2010,7 +2010,7 @@ menu "Power management options"
 source "kernel/power/Kconfig"
 
 config ARCH_SUSPEND_POSSIBLE
-	depends on !ARCH_S5P64X0 && !ARCH_S5P6442
+	depends on !ARCH_S5P64X0 && !ARCH_S5P6442 && !ARCH_S5PC100
 	def_bool y
 
 endmenu
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 ARM: Suspend: Fix build error on ARCH_S5PC100

Quoted 10 lines · Kukjin Kim

The current mainline codes of ARCH_S5PC100 can not support suspend to ram. So needs this for preventing build error.

---
Oops, I missed this in my previous patch.

As I know, firstly ARCH_S5P64X0 will support suspend to ram then ARCH_S5PC100 will do it. But right now, we need this.

I'd much rather do this a different way - let me know if this means the SoC based dependencies can be dropped. Patches to follow.

#2 lore raw

PATCH 1/2 ARM: Make consolidated PM sleep code depend on PM_SLEEP

CONFIG_PM is now set whenever we support either runtime PM in addition to suspend and hibernate. This causes build errors when runtime PM is enabled on a platform, but the CPU does not have the appropriate support for suspend.

So, switch this code to use CONFIG_PM_SLEEP rather than CONFIG_PM to allow runtime PM to be enabled without causing build errors.

---
 arch/arm/kernel/Makefile  |    2 +-
 arch/arm/mm/proc-arm920.S |    2 +-
 arch/arm/mm/proc-arm926.S |    2 +-
 arch/arm/mm/proc-sa1100.S |    2 +-
 arch/arm/mm/proc-v6.S     |    2 +-
 arch/arm/mm/proc-v7.S     |    2 +-
 arch/arm/mm/proc-xsc3.S   |    2 +-
 arch/arm/mm/proc-xscale.S |    2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
arch/arm/kernel/Makefile +1 -1
index 74554f1..8d95446 100644
@@ -29,7 +29,7 @@ obj-$(CONFIG_MODULES)		+= armksyms.o module.o
 obj-$(CONFIG_ARTHUR)		+= arthur.o
 obj-$(CONFIG_ISA_DMA)		+= dma-isa.o
 obj-$(CONFIG_PCI)		+= bios32.o isa.o
-obj-$(CONFIG_PM)		+= sleep.o
+obj-$(CONFIG_PM_SLEEP)		+= sleep.o
 obj-$(CONFIG_HAVE_SCHED_CLOCK)	+= sched_clock.o
 obj-$(CONFIG_SMP)		+= smp.o smp_tlb.o
 obj-$(CONFIG_HAVE_ARM_SCU)	+= smp_scu.o
arch/arm/mm/proc-arm920.S +1 -1
index 219980e..394b623 100644
@@ -390,7 +390,7 @@ ENTRY(cpu_arm920_set_pte_ext)
 /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
 .globl	cpu_arm920_suspend_size
 .equ	cpu_arm920_suspend_size, 4 * 3
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_arm920_do_suspend)
 	stmfd	sp!, {r4 - r7, lr}
 	mrc	p15, 0, r4, c13, c0, 0	@ PID
arch/arm/mm/proc-arm926.S +1 -1
index 6a4bdb2..0ed85d9 100644
@@ -404,7 +404,7 @@ ENTRY(cpu_arm926_set_pte_ext)
 /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
 .globl	cpu_arm926_suspend_size
 .equ	cpu_arm926_suspend_size, 4 * 3
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_arm926_do_suspend)
 	stmfd	sp!, {r4 - r7, lr}
 	mrc	p15, 0, r4, c13, c0, 0	@ PID
arch/arm/mm/proc-sa1100.S +1 -1
index 74483d1..184a9c9 100644
@@ -171,7 +171,7 @@ ENTRY(cpu_sa1100_set_pte_ext)
 
 .globl	cpu_sa1100_suspend_size
 .equ	cpu_sa1100_suspend_size, 4*4
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_sa1100_do_suspend)
 	stmfd	sp!, {r4 - r7, lr}
 	mrc	p15, 0, r4, c3, c0, 0		@ domain ID
arch/arm/mm/proc-v6.S +1 -1
index 832b6bd..3874412 100644
@@ -124,7 +124,7 @@ ENTRY(cpu_v6_set_pte_ext)
 /* Suspend/resume support: taken from arch/arm/mach-s3c64xx/sleep.S */
 .globl	cpu_v6_suspend_size
 .equ	cpu_v6_suspend_size, 4 * 8
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_v6_do_suspend)
 	stmfd	sp!, {r4 - r11, lr}
 	mrc	p15, 0, r4, c13, c0, 0	@ FCSE/PID
arch/arm/mm/proc-v7.S +1 -1
index 262fa88..713cea1 100644
@@ -211,7 +211,7 @@ cpu_v7_name:
 /* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */
 .globl	cpu_v7_suspend_size
 .equ	cpu_v7_suspend_size, 4 * 8
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_v7_do_suspend)
 	stmfd	sp!, {r4 - r11, lr}
 	mrc	p15, 0, r4, c13, c0, 0	@ FCSE/PID
arch/arm/mm/proc-xsc3.S +1 -1
index 63d8b20..5962136 100644
@@ -417,7 +417,7 @@ ENTRY(cpu_xsc3_set_pte_ext)
 
 .globl	cpu_xsc3_suspend_size
 .equ	cpu_xsc3_suspend_size, 4 * 8
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_xsc3_do_suspend)
 	stmfd	sp!, {r4 - r10, lr}
 	mrc	p14, 0, r4, c6, c0, 0	@ clock configuration, for turbo mode
arch/arm/mm/proc-xscale.S +1 -1
index 086038c..ce233bc 100644
@@ -518,7 +518,7 @@ ENTRY(cpu_xscale_set_pte_ext)
 
 .globl	cpu_xscale_suspend_size
 .equ	cpu_xscale_suspend_size, 4 * 7
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 ENTRY(cpu_xscale_do_suspend)
 	stmfd	sp!, {r4 - r10, lr}
 	mrc	p14, 0, r4, c6, c0, 0	@ clock configuration, for turbo mode
Signature · 1 line
1.7.4
#3 lore raw

PATCH 1/2 ARM: Make consolidated PM sleep code depend on PM_SLEEP

Hi,

Quoted 7 lines · Russell King - ARM Linux

CONFIG_PM is now set whenever we support either runtime PM in addition to suspend and hibernate. This causes build errors when runtime PM is enabled on a platform, but the CPU does not have the appropriate support for suspend.

So, switch this code to use CONFIG_PM_SLEEP rather than CONFIG_PM to allow runtime PM to be enabled without causing build errors.

I've build-tested on some failing platforms theses 2 patches and the build are now succeeding. The only PM related zImage build error I found was for s5pc100:

arch/arm/plat-samsung/pm.c:32:26: fatal error: mach/pm-core.h: No such file or directory

S5PC100 is a armv7 that's why it's still selected. I guess it will still need some extra care unless the pm-core.h file is provided. One can try use the same file as for s5pv210.h. I guess that it has probably not be done because it was not working (I'm even wondering the differences between s5pc100 and s5pv210 but this has nothing to do with our current build troubles).

Arnaud

#4 lore raw

PATCH 1/2 ARM: Make consolidated PM sleep code depend on PM_SLEEP

Quoted 5 lines · Arnaud Patard

I've build-tested on some failing platforms theses 2 patches and the build are now succeeding. The only PM related zImage build error I found was for s5pc100:

arch/arm/plat-samsung/pm.c:32:26: fatal error: mach/pm-core.h: No such file or directory

That probably existing from before the consolidation patch, so I won't worry about it.

author
#5 lore raw

PATCH 1/2 ARM: Make consolidated PM sleep code depend on PM_SLEEP

Quoted 7 lines · Russell King - ARM Linux
Quoted 5 lines · Arnaud Patard

I've build-tested on some failing platforms theses 2 patches and the build are now succeeding. The only PM related zImage build error I found was for s5pc100:

arch/arm/plat-samsung/pm.c:32:26: fatal error: mach/pm-core.h: No such

file

Quoted 4 lines

or directory

That probably existing from before the consolidation patch, so I won't worry about it.

Yeah, Russell is right :)

I will sort it out.
Thanks for your pointing out.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#6 lore raw

PATCH 2/2 ARM: Only allow PM_SLEEP with CPUs which support suspend

In reply to Russell King - ARM Linux

Offering CONFIG_PM_SLEEP for CPUs which do not support suspend leads to build errors, so only set CONFIG_ARCH_SUSPEND_POSSIBLE if we have a CPU selected which supports suspend.

---
 arch/arm/Kconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/Kconfig +2 -0
index 5b9f78b..9954c9b 100644
@@ -2012,6 +2012,8 @@ source "kernel/power/Kconfig"
 
 config ARCH_SUSPEND_POSSIBLE
 	depends on !ARCH_S5P64X0 && !ARCH_S5P6442
+	depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
+		CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
 	def_bool y
 
 endmenu
Signature · 1 line
1.7.4
author
#7 lore raw

PATCH 1/1 ARM: Suspend: Fix build error on ARCH_S5PC100

In reply to Russell King - ARM Linux
Quoted 10 lines · Russell King - ARM Linux
Quoted 8 lines · Kukjin Kim

The current mainline codes of ARCH_S5PC100 can not support suspend to ram. So needs this for preventing build error.

---
Oops, I missed this in my previous patch.

Quoted 5 lines
Quoted 2 lines

As I know, firstly ARCH_S5P64X0 will support suspend to ram then ARCH_S5PC100 will do it. But right now, we need this.

I'd much rather do this a different way - let me know if this means the SoC based dependencies can be dropped. Patches to follow.

Yeah, I checked your patches. It's ok to me but this is also needed right now for preventing build errors with s5pc100_defconfig...because there is no regarding headers for supporting suspend to ram.

However as I mentioned, the suspend to ram will be supported soon on them then we can drop its dependencies.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#8 lore raw

PATCH 1/1 ARM: Suspend: Fix build error on ARCH_S5PC100

Quoted 17 lines · Kukjin Kim
Quoted 10 lines · Russell King - ARM Linux
Quoted 8 lines · Kukjin Kim

The current mainline codes of ARCH_S5PC100 can not support suspend to ram. So needs this for preventing build error.

---
Oops, I missed this in my previous patch.

Quoted 5 lines
Quoted 2 lines

As I know, firstly ARCH_S5P64X0 will support suspend to ram then ARCH_S5PC100 will do it. But right now, we need this.

I'd much rather do this a different way - let me know if this means the SoC based dependencies can be dropped. Patches to follow.

Quoted 6 lines

Yeah, I checked your patches. It's ok to me but this is also needed right now for preventing build errors with s5pc100_defconfig...because there is no regarding headers for supporting suspend to ram.

However as I mentioned, the suspend to ram will be supported soon on them then we can drop its dependencies.

Could I have an updated patch which applies to mainline please?

author
#9 lore raw

PATCH 1/1 ARM: Suspend: Fix build error on ARCH_S5PC100

Quoted 13 lines · Russell King - ARM Linux
Quoted 11 lines · Kukjin Kim
Quoted 10 lines · Russell King - ARM Linux
Quoted 8 lines · Kukjin Kim

The current mainline codes of ARCH_S5PC100 can not support suspend to ram. So needs this for preventing build error.

---
Oops, I missed this in my previous patch.

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

As I know, firstly ARCH_S5P64X0 will support suspend to ram then ARCH_S5PC100 will do it. But right now, we need this.

I'd much rather do this a different way - let me know if this means the SoC based dependencies can be dropped. Patches to follow.

Yeah, I checked your patches. It's ok to me but this is also needed

right

Quoted 1 line
Quoted 1 line

now for preventing build errors with s5pc100_defconfig...because there

is

Quoted 4 lines

no

Quoted 3 lines

regarding headers for supporting suspend to ram.

However as I mentioned, the suspend to ram will be supported soon on

them

Quoted 3 lines
Quoted 1 line

then we can drop its dependencies.

Could I have an updated patch which applies to mainline please?

From: Kukjin Kim <[email protected]>
Date: Mon, 2 May 2011 09:33:01 +0900
Subject: [PATCH] ARM: Suspend: Fix build error on ARCH_S5PC100

The current mainline codes of ARCH_S5PC100 cannot support suspend to ram. So needs this for preventing build error.

---
 arch/arm/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/Kconfig +1 -1
index 377a7a5..96839d9 100644
@@ -2010,7 +2010,7 @@ menu "Power management options"
 source "kernel/power/Kconfig"
 
 config ARCH_SUSPEND_POSSIBLE
-	depends on !ARCH_S5P64X0 && !ARCH_S5P6442
+	depends on !ARCH_S5P64X0 && !ARCH_S5P6442 && !ARCH_S5PC100
 	depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
 		CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
 	def_bool y
Signature · 8 lines
If any problems, please let me know.
Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
#10 lore raw

PATCH 1/1 ARM: Suspend: Fix build error on ARCH_S5PC100

Quoted 37 lines · Kukjin Kim
Quoted 13 lines · Russell King - ARM Linux
Quoted 11 lines · Kukjin Kim
Quoted 10 lines · Russell King - ARM Linux
Quoted 8 lines · Kukjin Kim

The current mainline codes of ARCH_S5PC100 can not support suspend to ram. So needs this for preventing build error.

---
Oops, I missed this in my previous patch.

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

As I know, firstly ARCH_S5P64X0 will support suspend to ram then ARCH_S5PC100 will do it. But right now, we need this.

I'd much rather do this a different way - let me know if this means the SoC based dependencies can be dropped. Patches to follow.

Yeah, I checked your patches. It's ok to me but this is also needed

right

Quoted 1 line
Quoted 1 line

now for preventing build errors with s5pc100_defconfig...because there

is

Quoted 4 lines

no

Quoted 3 lines

regarding headers for supporting suspend to ram.

However as I mentioned, the suspend to ram will be supported soon on

them

Quoted 3 lines
Quoted 1 line

then we can drop its dependencies.

Could I have an updated patch which applies to mainline please?

From: Kukjin Kim <[email protected]>
Date: Mon, 2 May 2011 09:33:01 +0900
Subject: [PATCH] ARM: Suspend: Fix build error on ARCH_S5PC100

Quoted 5 lines

The current mainline codes of ARCH_S5PC100 cannot support suspend to ram. So needs this for preventing build error.

Looks fine, but can it go to the patch system please?

author
#11 lore raw

PATCH 1/1 ARM: Suspend: Fix build error on ARCH_S5PC100

Quoted 16 lines · Russell King - ARM Linux
Quoted 14 lines · Kukjin Kim
Quoted 13 lines · Russell King - ARM Linux
Quoted 11 lines · Kukjin Kim
Quoted 10 lines · Russell King - ARM Linux
Quoted 8 lines · Kukjin Kim

The current mainline codes of ARCH_S5PC100 can not support suspend to ram. So needs this for preventing build error.

---
Oops, I missed this in my previous patch.

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

As I know, firstly ARCH_S5P64X0 will support suspend to ram then ARCH_S5PC100 will do it. But right now, we need this.

I'd much rather do this a different way - let me know if this

means

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

the SoC based dependencies can be dropped. Patches to follow.

Yeah, I checked your patches. It's ok to me but this is also needed

right

Quoted 1 line
Quoted 1 line

now for preventing build errors with s5pc100_defconfig...because

there

Quoted 14 lines
Quoted 14 lines

is

Quoted 4 lines

no

Quoted 3 lines

regarding headers for supporting suspend to ram.

However as I mentioned, the suspend to ram will be supported soon on

them

Quoted 3 lines
Quoted 1 line

then we can drop its dependencies.

Could I have an updated patch which applies to mainline please?

From: Kukjin Kim <[email protected]>
Date: Mon, 2 May 2011 09:33:01 +0900
Subject: [PATCH] ARM: Suspend: Fix build error on ARCH_S5PC100

Quoted 7 lines
Quoted 5 lines

The current mainline codes of ARCH_S5PC100 cannot support suspend to ram. So needs this for preventing build error.

Looks fine, but can it go to the patch system please?

Ok, will do soon.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.