sh7372 compile breakage in current -next
Quoted 10 lines · Rafael J. Wysocki
Quoted 5 lines · Guennadi Liakhovetski
arch/arm/mach-shmobile/pm-sh7372.c: In function 'sh7372_pm_init':arch/arm/mach-shmobile/pm-sh7372.c:476: error: 'sh7372_a3sp' undeclared (first use in this function)arch/arm/mach-shmobile/pm-sh7372.c:476: error: (Each undeclared identifier is reported only oncearch/arm/mach-shmobile/pm-sh7372.c:476: error: for each function it appears in.) make[2]: *** [arch/arm/mach-shmobile/pm-sh7372.o] Error 1OK, I'll have a look at that.
What's the .config you used?
Do you have CONFIG_PM unset, perchance?
Rafael
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · Rafael J. Wysocki
Quoted 5 lines · Guennadi Liakhovetski
arch/arm/mach-shmobile/pm-sh7372.c: In function 'sh7372_pm_init':arch/arm/mach-shmobile/pm-sh7372.c:476: error: 'sh7372_a3sp' undeclared (first use in this function)arch/arm/mach-shmobile/pm-sh7372.c:476: error: (Each undeclared identifier is reported only oncearch/arm/mach-shmobile/pm-sh7372.c:476: error: for each function it appears in.) make[2]: *** [arch/arm/mach-shmobile/pm-sh7372.o] Error 1
Quoted 5 lines
Quoted 3 lines
OK, I'll have a look at that.
What's the .config you used?
Do you have
CONFIG_PMunset, perchance?
Well, I'm quite sure you do. The appended patch should help, then.
Thanks,
Rafael
---
From: Rafael J. Wysocki <[email protected]>
Subject: PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset
Fix build regression introduced by commit 056879d2f244001b2888cdc8cf (ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix) by moving the intialization of the A3SP domain to a separate function and providing an empty definition of it for CONFIG_PM unset.
--- arch/arm/mach-shmobile/pm-sh7372.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
Index: linux/arch/arm/mach-shmobile/pm-sh7372.c =================================--- linux.orig/arch/arm/mach-shmobile/pm-sh7372.c +++ linux/arch/arm/mach-shmobile/pm-sh7372.c
@@ -232,11 +232,23 @@ struct sh7372_pm_domain sh7372_a3sp = {
.no_debug = true,
};
+static void sh7372_a3sp_init(void)
+{
+ /* serial consoles make use of SCIF hardware located in A3SP,
+ * keep such power domain on if "no_console_suspend" is set.
+ */
+ sh7372_a3sp.stay_on = !console_suspend_enabled;
+}
+
struct sh7372_pm_domain sh7372_a3sg = {
.bit_shift = 13,
};
-#endif /* CONFIG_PM */
+#else /* !CONFIG_PM */
+
+static inline void sh7372_a3sp_init(void) {}
+
+#endif /* !CONFIG_PM */
#if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE) static int sh7372_do_idle_core_standby(unsigned long unused)
@@ -470,10 +482,7 @@ void __init sh7372_pm_init(void)
/* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */ __raw_writel(0, PDNSEL);
- /* serial consoles make use of SCIF hardware located in A3SP,
- * keep such power domain on if "no_console_suspend" is set.
- */
- sh7372_a3sp.stay_on = !console_suspend_enabled;
+ sh7372_a3sp_init();
sh7372_suspend_init();
sh7372_cpuidle_init();
Guennadi Liakhovetski
Tested-byQuoted 9 lines · Rafael J. Wysocki
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · Rafael J. Wysocki
Quoted 5 lines · Guennadi Liakhovetski
arch/arm/mach-shmobile/pm-sh7372.c: In function 'sh7372_pm_init':arch/arm/mach-shmobile/pm-sh7372.c:476: error: 'sh7372_a3sp' undeclared (first use in this function)arch/arm/mach-shmobile/pm-sh7372.c:476: error: (Each undeclared identifier is reported only oncearch/arm/mach-shmobile/pm-sh7372.c:476: error: for each function it appears in.) make[2]: *** [arch/arm/mach-shmobile/pm-sh7372.o] Error 1
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
OK, I'll have a look at that.
What's the .config you used?
Do you have
CONFIG_PMunset, perchance?Well, I'm quite sure you do. The appended patch should help, then.
Yes, you're right on both occasions:-)
Thanks
Guennadi
Quoted 49 lines
Thanks,
Rafael---
From: Rafael J. Wysocki <[email protected]>
Subject: PM / shmobile: Fix build ofsh7372_pm_init()forCONFIG_PMunsetFix build regression introduced by commit
056879d2f244001b2888cdc8cf(ARM: mach-shmobile: sh7372 A3SPno_suspend_consolefix) by moving the intialization of the A3SP domain to a separate function and providing an empty definition of it forCONFIG_PMunset.Reported-by Guennadi Liakhovetski <[email protected]>Signed-off-by Rafael J. Wysocki <[email protected]>--- arch/arm/mach-shmobile/pm-sh7372.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)Index:
linux/arch/arm/mach-shmobile/pm-sh7372.c=================================> ---linux.orig/arch/arm/mach-shmobile/pm-sh7372.c+++linux/arch/arm/mach-shmobile/pm-sh7372.c(quoted diff) +13
-1@@ -232,11 +232,23 @@ struct sh7372_pm_domain sh7372_a3sp = { .no_debug = true, }; +static void sh7372_a3sp_init(void) +{ + /* serial consoles make use of SCIF hardware located in A3SP, + * keep such power domain on if "no_console_suspend" is set. + */ + sh7372_a3sp.stay_on = !console_suspend_enabled; +} + struct sh7372_pm_domain sh7372_a3sg = { .bit_shift = 13, }; -#endif /* CONFIG_PM */ +#else /* !CONFIG_PM */ + +static inline void sh7372_a3sp_init(void) {} + +#endif /* !CONFIG_PM */ #if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE) static int sh7372_do_idle_core_standby(unsigned long unused)@@ -470,10 +482,7 @@ void __init sh7372_pm_init(void) /* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */
Review void __init sh7372_pm_init(void) · line 488
Quoted 10 lines
(quoted diff) +1
-4__raw_writel(0, PDNSEL); - /* serial consoles make use of SCIF hardware located in A3SP, - * keep such power domain on if "no_console_suspend" is set. - */ - sh7372_a3sp.stay_on = !console_suspend_enabled; + sh7372_a3sp_init(); sh7372_suspend_init(); sh7372_cpuidle_init();
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/