Skip to contentSkip to conversation

serial: s3c: Fix build of header without serial_core.h preinclusion

PATCH New Tomasz Figa 2 participants 11 messages Mar 18, 2014 – Mar 20, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/6 serial: s3c: Fix build of header without serial_core.h preinclusion

From: Mark Brown <[email protected]>

serial_s3c.h uses upf_t which is defined in serial_core.h but does not include that itself meaning that users which include serial_s3c.h by itself don't build.

[t.figa: Moved inclusion under #ifndef __ASSEMBLY__ to fix mach-exynos.]
---
 include/linux/serial_s3c.h | 2 ++
 1 file changed, 2 insertions(+)
include/linux/serial_s3c.h +2 -0
index 907d9d1..e6fc956 100644
@@ -233,6 +233,8 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/serial_core.h>
+
 /* configuration structure for per-machine configurations for the
  * serial port
  *
Signature · 1 line
1.9.0
#1 lore raw

PATCH v2 2/6 ARM: s3c64xx: Fix build for implicit serial_s3c.h inclusion

From: Mark Brown <[email protected]>

Some very recent change appears to have removed an implicit inclusion of serial_s3c.h causing build failures due to references to UART registers in the serial port restore code in next-20140318. Include it explicitly to fix the build.

---
 arch/arm/mach-s3c64xx/include/mach/pm-core.h | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-s3c64xx/include/mach/pm-core.h +2 -0
index c0537f4..a30a1e3 100644
@@ -15,6 +15,8 @@
 #ifndef __MACH_S3C64XX_PM_CORE_H
 #define __MACH_S3C64XX_PM_CORE_H __FILE__
 
+#include <linux/serial_s3c.h>
+
 #include <mach/regs-gpio.h>
 
 static inline void s3c_pm_debug_init_uart(void)
Signature · 1 line
1.9.0
#2 lore raw

PATCH v2 3/6 ARM: EXYNOS: Fix compilation error in cpuidle.c

In reply to Tomasz Figa

The big series refactoring Exynos suspend to RAM handling missed the cpuidle driver that is disabled in exynos_defconfig, leaving it including old mach/pm_core.h header and using old s3c_cpu_resume symbol instead of new exynos_cpu_resume, resulting in compilation failures with CONFIG_ARCH_EXYNOS and CONFIG_CPU_IDLE enabled.

This patch fixes that silly mistake and performs necessary modification to arhc/arm/exynos/cpuidle.c to make it compile again.

---
 arch/arm/mach-exynos/cpuidle.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-exynos/cpuidle.c +1 -2
index f57cb91..b530231 100644
@@ -26,7 +26,6 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
-#include <mach/pm-core.h>
 #include <mach/map.h>
 
 #include "common.h"
@@ -127,7 +126,7 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
 	/* Set value of power down register for aftr mode */
 	exynos_sys_powerdown_conf(SYS_AFTR);
 
-	__raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR);
+	__raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR);
 	__raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG);
 
 	save_cpu_arch_register();
Signature · 1 line
1.9.0
#3 lore raw

PATCH v2 3/6 ARM: EXYNOS: Fix compilation error in cpuidle.c

Quoted 27 lines · Tomasz Figa

The big series refactoring Exynos suspend to RAM handling missed the cpuidle driver that is disabled in exynos_defconfig, leaving it including old mach/pm_core.h header and using old s3c_cpu_resume symbol instead of new exynos_cpu_resume, resulting in compilation failures with CONFIG_ARCH_EXYNOS and CONFIG_CPU_IDLE enabled.

This patch fixes that silly mistake and performs necessary modification to arhc/arm/exynos/cpuidle.c to make it compile again.

---
  arch/arm/mach-exynos/cpuidle.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-exynos/cpuidle.c +0 -1
index f57cb91..b530231 100644
@@ -26,7 +26,6 @@
  #include<plat/cpu.h>
  #include<plat/pm.h>
 
-#include<mach/pm-core.h>
  #include<mach/map.h>
 
  #include "common.h"

arch/arm/mach-exynos/cpuidle.c static int exynos4_enter_core0_aftr(struct cpuidle_device *dev, · line 132

Quoted 8 lines
arch/arm/mach-exynos/cpuidle.c +1 -1
@@ -127,7 +126,7 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev,
  	/* Set value of power down register for aftr mode */
  	exynos_sys_powerdown_conf(SYS_AFTR);
 
-	__raw_writel(virt_to_phys(s3c_cpu_resume), REG_DIRECTGO_ADDR);
+	__raw_writel(virt_to_phys(exynos_cpu_resume), REG_DIRECTGO_ADDR);
  	__raw_writel(S5P_CHECK_AFTR, REG_DIRECTGO_FLAG);
 
  	save_cpu_arch_register();

OK, applied into s2r-pm-samsung-2 branch, thanks.

- Kukjin

#4 lore raw

PATCH v2 4/6 ARM: SAMSUNG: Fix rebase error in pm-debug.c

In reply to Tomasz Figa

Recent Samsung header clean-up series did heavy reorganization of various Samsung-specific headers, unfortunately causing a conflict with Samsung PM consolidation series part 2 - multiplatform) and resulting with a merge error that caused a build failure, due to a missing header being included.

This patch fixes this by removing incorrect header inclusion.

---
 arch/arm/plat-samsung/pm-debug.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm/plat-samsung/pm-debug.c +0 -1
index 602998b..88bb4cf 100644
@@ -20,7 +20,6 @@
 
 #include <plat/cpu.h>
 #include <plat/pm-common.h>
-#include <plat/regs-serial.h>
 
 #ifdef CONFIG_SAMSUNG_ATAGS
 #include <mach/pm-core.h>
Signature · 1 line
1.9.0
#5 lore raw

PATCH v2 4/6 ARM: SAMSUNG: Fix rebase error in pm-debug.c

Quoted 18 lines · Tomasz Figa

Recent Samsung header clean-up series did heavy reorganization of various Samsung-specific headers, unfortunately causing a conflict with Samsung PM consolidation series part 2 - multiplatform) and resulting with a merge error that caused a build failure, due to a missing header being included.

This patch fixes this by removing incorrect header inclusion.

---
  arch/arm/plat-samsung/pm-debug.c | 1 -
  1 file changed, 1 deletion(-)
arch/arm/plat-samsung/pm-debug.c +0 -0
index 602998b..88bb4cf 100644

arch/arm/plat-samsung/pm-debug.c line 25

Quoted 7 lines
arch/arm/plat-samsung/pm-debug.c +0 -1
@@ -20,7 +20,6 @@
 
  #include<plat/cpu.h>
  #include<plat/pm-common.h>
-#include<plat/regs-serial.h>
 
  #ifdef CONFIG_SAMSUNG_ATAGS
  #include<mach/pm-core.h>

OK, applied into s2r-pm-samsung-2 branch.

Thanks,
Kukjin

#6 lore raw

PATCH v2 5/6 ARM: s3c64xx: Fix incorrect selection of PM-related symbols

In reply to Tomasz Figa

This patch modifies ARCH_S3C64XX Kconfig entry to select SAMSUNG_WAKEMASK and PM_GENERIC_DOMAINS conditionally if PM_SLEEP and PM_RUNTIME are enabled respectively to avoid introducing unmet dependenies such as

warning: (ARCH_S3C64XX && S3C2412_PM && CPU_S5P6440 && CPU_S5P6450) selects SAMSUNG_WAKEMASK which has unmet direct dependencies (PLAT_SAMSUNG && PM)

warning: (ARCH_S3C64XX && ARCH_EXYNOS4 && SOC_EXYNOS5250 && SOC_EXYNOS5420) selects PM_GENERIC_DOMAINS which has unmet direct dependencies (PM)

and related compilation errors, when PM_SLEEP or PM_RUNTIME is not enabled.

---
 arch/arm/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/Kconfig +2 -2
index afc751f..0608177 100644
@@ -757,11 +757,11 @@ config ARCH_S3C64XX
 	select HAVE_TCM
 	select NO_IOPORT_MAP
 	select PLAT_SAMSUNG
-	select PM_GENERIC_DOMAINS
+	select PM_GENERIC_DOMAINS if PM_RUNTIME
 	select S3C_DEV_NAND
 	select S3C_GPIO_TRACK
 	select SAMSUNG_ATAGS
-	select SAMSUNG_WAKEMASK
+	select SAMSUNG_WAKEMASK if PM_SLEEP
 	select SAMSUNG_WDT_RESET
 	help
 	  Samsung S3C64XX series based systems
Signature · 1 line
1.9.0
Applied
#7 lore raw

PATCH v2 5/6 ARM: s3c64xx: Fix incorrect selection of PM-related symbols

Quoted 29 lines · Tomasz Figa

This patch modifies ARCH_S3C64XX Kconfig entry to select SAMSUNG_WAKEMASK and PM_GENERIC_DOMAINS conditionally if PM_SLEEP and PM_RUNTIME are enabled respectively to avoid introducing unmet dependenies such as

warning: (ARCH_S3C64XX&& S3C2412_PM&& CPU_S5P6440&& CPU_S5P6450) selects SAMSUNG_WAKEMASK which has unmet direct dependencies (PLAT_SAMSUNG&& PM)

warning: (ARCH_S3C64XX&& ARCH_EXYNOS4&& SOC_EXYNOS5250&& SOC_EXYNOS5420) selects PM_GENERIC_DOMAINS which has unmet direct dependencies (PM)

and related compilation errors, when PM_SLEEP or PM_RUNTIME is not enabled.

---
  arch/arm/Kconfig | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/Kconfig +0 -0
index afc751f..0608177 100644
@@ -757,11 +757,11 @@ config ARCH_S3C64XX
  	select HAVE_TCM
  	select NO_IOPORT_MAP
  	select PLAT_SAMSUNG

arch/arm/Kconfig config ARCH_S3C64XX · line 767

Quoted 10 lines
arch/arm/Kconfig +2 -2
-	select PM_GENERIC_DOMAINS
+	select PM_GENERIC_DOMAINS if PM_RUNTIME
  	select S3C_DEV_NAND
  	select S3C_GPIO_TRACK
  	select SAMSUNG_ATAGS
-	select SAMSUNG_WAKEMASK
+	select SAMSUNG_WAKEMASK if PM_SLEEP
  	select SAMSUNG_WDT_RESET
  	help
  	  Samsung S3C64XX series based systems

Applied, thanks.

- Kukjin

#8 lore raw

PATCH v2 6/6 ARM: s5p64x0: Explicitly include linux/serial_s3c.h in mach/pm-core.h

In reply to Tomasz Figa

This patch fixes compilation failure due to missing explicit inclusion of linux/serial_s3c.h in mach/pm-core.h, which contains definitions required for further code in this header.

---
 arch/arm/mach-s5p64x0/include/mach/pm-core.h | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/mach-s5p64x0/include/mach/pm-core.h +2 -0
index e52f754..1e0eb65 100644
@@ -12,6 +12,8 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/serial_s3c.h>
+
 #include <mach/regs-gpio.h>
 
 static inline void s3c_pm_debug_init_uart(void)
Signature · 1 line
1.9.0
Applied
#9 lore raw

PATCH v2 6/6 ARM: s5p64x0: Explicitly include linux/serial_s3c.h in mach/pm-core.h

Quoted 14 lines · Tomasz Figa

This patch fixes compilation failure due to missing explicit inclusion of linux/serial_s3c.h in mach/pm-core.h, which contains definitions required for further code in this header.

---
  arch/arm/mach-s5p64x0/include/mach/pm-core.h | 2 ++
  1 file changed, 2 insertions(+)
arch/arm/mach-s5p64x0/include/mach/pm-core.h +0 -0
index e52f754..1e0eb65 100644

arch/arm/mach-s5p64x0/include/mach/pm-core.h line 19

Quoted 8 lines
arch/arm/mach-s5p64x0/include/mach/pm-core.h +2 -0
@@ -12,6 +12,8 @@
   * published by the Free Software Foundation.
   */
 
+#include<linux/serial_s3c.h>
+
  #include<mach/regs-gpio.h>
 
  static inline void s3c_pm_debug_init_uart(void)

Applied, thanks.

- Kukjin

Applied
#10 lore raw

PATCH v2 1/6 serial: s3c: Fix build of header without serial_core.h preinclusion

In reply to Tomasz Figa
Quoted 6 lines · Tomasz Figa

From: Mark Brown<[email protected]>

serial_s3c.h uses upf_t which is defined in serial_core.h but does not include that itself meaning that users which include serial_s3c.h by itself don't build.

Oops yeah, When we replace inclusion of <plat/regs-serial.h> with serial_s3c.h, maybe we missed inclusion of serial_core.h in the following files:

arch/arm/include/debug/samsung.S
arch/arm/mach-s3c24xx/include/mach/debug-macro.S
arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
arch/arm/mach-s3c24xx/mach-vr1000.c
arch/arm/mach-s3c24xx/sleep-s3c2410.S
arch/arm/mach-s3c24xx/sleep.S
arch/arm/mach-s3c64xx/include/mach/debug-macro.S
arch/arm/mach-s5p64x0/include/mach/debug-macro.S
arch/arm/mach-s5pc100/include/mach/debug-macro.S
arch/arm/mach-s5pv210/include/mach/debug-macro.S

So, this fix looks good to me. BTW, we need to cleanup inclusion of serial_core.h later because it is useless with this.

Applied, thanks.
- Kukjin

Quoted 20 lines
[t.figa: Moved inclusion under #ifndef __ASSEMBLY__ to fix mach-exynos.]
---
  include/linux/serial_s3c.h | 2 ++
  1 file changed, 2 insertions(+)
include/linux/serial_s3c.h +2 -0
index 907d9d1..e6fc956 100644
@@ -233,6 +233,8 @@
 
  #ifndef __ASSEMBLY__
 
+#include<linux/serial_core.h>
+
  /* configuration structure for per-machine configurations for the
   * serial port
   *