Skip to contentSkip to conversation

Fix zoom2/zoom3 build error

PATCH In review Manjunatha GK 3 participants 3 messages Nov 16, 2009

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

PATCH v3 1/1 Fix zoom2/zoom3 build error

The Zoom2 and Zoom3 build breaks on linux-omap-pm(HEAD:pm) when CONFIG_DEBUG_FS is not enabled.

Build error log:
arch/arm/mach-omap2/built-in.o: In function `omap_sram_idle':
arch/arm/mach-omap2/pm34xx.c:449: undefined reference to pm_dbg_regset_save' arch/arm/mach-omap2/pm34xx.c:460: undefined reference to pm_dbg_regset_save' arch/arm/mach-omap2/built-in.o: In function `configure_vc':
arch/arm/mach-omap2/pm34xx.c:1237: undefined reference to pm_dbg_regset_init' arch/arm/mach-omap2/pm34xx.c:1238: undefined reference to pm_dbg_regset_init'
make: *** [.tmp_vmlinux1] Error 1

This patch fixes the above errors.

Kernel booting is tested on omap zoom2 and zoom3 boards.

Review Comments fixed:
http://patchwork.kernel.org/patch/56955/
http://patchwork.kernel.org/patch/56946/

---
 arch/arm/mach-omap2/pm-debug.c |    2 --
 arch/arm/mach-omap2/pm.h       |    8 ++++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/pm-debug.c +0 -2
index 767ebbc..5284967 100644
@@ -623,6 +623,4 @@ static int __init pm_dbg_init(void)
 }
 arch_initcall(pm_dbg_init);
 
-#else
-void pm_dbg_update_time(struct powerdomain *pwrdm, int prev) {}
 #endif
arch/arm/mach-omap2/pm.h +6 -2
index c195b14..7bc86b6 100644
@@ -76,12 +76,16 @@ extern struct omap_dm_timer *gptimer_wakeup;
 #ifdef CONFIG_PM_DEBUG
 extern void omap2_pm_dump(int mode, int resume, unsigned int us);
 extern int omap2_pm_debug;
+#else
+#define omap2_pm_dump(mode, resume, us)		do {} while (0);
+#define omap2_pm_debug				0
+#endif
+
+#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
 extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev);
 extern int pm_dbg_regset_save(int reg_set);
 extern int pm_dbg_regset_init(int reg_set);
 #else
-#define omap2_pm_dump(mode, resume, us)		do {} while (0);
-#define omap2_pm_debug				0
 #define pm_dbg_update_time(pwrdm, prev) do {} while (0);
 #define pm_dbg_regset_save(reg_set) do {} while (0);
 #define pm_dbg_regset_init(reg_set) do {} while (0);
Signature · 1 line
1.6.0.4
#1 lore raw

Manjunatha GK had written, on 11/16/2009 08:46 AM, the following:
Thanks.

Quoted 1 line

Re: [PATCH v3] [OMAP3_PM] Fix zoom2/zoom3 build error

please rename subject to:
[PATCH V3] OMAP3: PM: Fix build failure with !DEBUG_FS

this is not zoom2/zoom3 specific - am I right?

Quoted 12 lines

The Zoom2 and Zoom3 build breaks on linux-omap-pm(HEAD:pm) when CONFIG_DEBUG_FS is not enabled.

Build error log:
arch/arm/mach-omap2/built-in.o: In function `omap_sram_idle':
arch/arm/mach-omap2/pm34xx.c:449: undefined reference to pm_dbg_regset_save' arch/arm/mach-omap2/pm34xx.c:460: undefined reference to pm_dbg_regset_save' arch/arm/mach-omap2/built-in.o: In function `configure_vc':
arch/arm/mach-omap2/pm34xx.c:1237: undefined reference to pm_dbg_regset_init' arch/arm/mach-omap2/pm34xx.c:1238: undefined reference to pm_dbg_regset_init'
make: *** [.tmp_vmlinux1] Error 1

Quoted 1 line

This patch fixes the above errors.

you could state "provide entries for the same when the DEBUG_FS is undefined"

Quoted 6 lines

Kernel booting is tested on omap zoom2 and zoom3 boards.

Review Comments fixed:
http://patchwork.kernel.org/patch/56955/
http://patchwork.kernel.org/patch/56946/

you may want to move this into the diffstat section

Quoted 2 lines

CC the reviewers might be nice.

Quoted 39 lines
---
 arch/arm/mach-omap2/pm-debug.c |    2 --
 arch/arm/mach-omap2/pm.h       |    8 ++++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/pm-debug.c +0 -2
index 767ebbc..5284967 100644
@@ -623,6 +623,4 @@ static int __init pm_dbg_init(void)
 }
 arch_initcall(pm_dbg_init);
 
-#else
-void pm_dbg_update_time(struct powerdomain *pwrdm, int prev) {}
 #endif
arch/arm/mach-omap2/pm.h +6 -2
index c195b14..7bc86b6 100644
@@ -76,12 +76,16 @@ extern struct omap_dm_timer *gptimer_wakeup;
 #ifdef CONFIG_PM_DEBUG
 extern void omap2_pm_dump(int mode, int resume, unsigned int us);
 extern int omap2_pm_debug;
+#else
+#define omap2_pm_dump(mode, resume, us)		do {} while (0);
+#define omap2_pm_debug				0
+#endif
+
+#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
 extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev);
 extern int pm_dbg_regset_save(int reg_set);
 extern int pm_dbg_regset_init(int reg_set);
 #else
-#define omap2_pm_dump(mode, resume, us)		do {} while (0);
-#define omap2_pm_debug				0
 #define pm_dbg_update_time(pwrdm, prev) do {} while (0);
 #define pm_dbg_regset_save(reg_set) do {} while (0);
 #define pm_dbg_regset_init(reg_set) do {} while (0);
Signature · 2 lines
Regards,
Nishanth Menon
#2 lore raw
Quoted 20 lines · Nishanth Menon

Manjunatha GK had written, on 11/16/2009 08:46 AM, the following:
Thanks.

Quoted 1 line

Re: [PATCH v3] [OMAP3_PM] Fix zoom2/zoom3 build error

please rename subject to:
[PATCH V3] OMAP3: PM: Fix build failure with !DEBUG_FS

this is not zoom2/zoom3 specific - am I right?

Quoted 12 lines

The Zoom2 and Zoom3 build breaks on linux-omap-pm(HEAD:pm) when CONFIG_DEBUG_FS is not enabled.

Build error log:
arch/arm/mach-omap2/built-in.o: In function `omap_sram_idle':
arch/arm/mach-omap2/pm34xx.c:449: undefined reference to pm_dbg_regset_save' arch/arm/mach-omap2/pm34xx.c:460: undefined reference to pm_dbg_regset_save' arch/arm/mach-omap2/built-in.o: In function `configure_vc':
arch/arm/mach-omap2/pm34xx.c:1237: undefined reference to pm_dbg_regset_init' arch/arm/mach-omap2/pm34xx.c:1238: undefined reference to pm_dbg_regset_init'
make: *** [.tmp_vmlinux1] Error 1

Quoted 4 lines
Quoted 1 line

This patch fixes the above errors.

you could state "provide entries for the same when the DEBUG_FS is undefined"

I agree with Nishanth's comments.

Since these are minor, I'll do cleanups to subject and changelog and push this to the PM branch.

Thanks,

Kevin