Skip to contentSkip to conversation

arm/pxa: Let zeus.c link without CONFIG_PM enabled.

PATCH New Stefan Schmidt 3 participants 4 messages Feb 16, 2010 – Feb 18, 2010

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

PATCH 2/2 arm/pxa: Let zeus.c link without CONFIG_PM enabled.

Add some safety check for CONFIG_PM around zeus_power_off(). Without it linking can fail like this:

arch/arm/mach-pxa/built-in.o: In function `zeus_power_off':
e800.c:(.text+0x2bc8): undefined reference to `pxa27x_cpu_suspend'

--

This smells a bit fishy as zeus_power_off() is only mapped to pm_power_off and that one seems to come and go to nowhere. Is this any magic I don't get on a first glance?

---
 arch/arm/mach-pxa/zeus.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/zeus.c +4 -0
index 75f2a37..213279d 100644
@@ -621,11 +621,15 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = {
 	.udc_command = zeus_udc_command,
 };
 
+#ifdef CONFIG_PM
 static void zeus_power_off(void)
 {
 	local_irq_disable();
 	pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP);
 }
+#else
+#define zeus_power_off   NULL
+#endif
 
 #ifdef CONFIG_APM_EMULATION
 static void zeus_get_power_status(struct apm_power_info *info)
Signature · 1 line
1.6.6.2
#1 lore raw

PATCH 2/2 arm/pxa: Let zeus.c link without CONFIG_PM enabled.

Quoted 6 lines · On Tue, 16 Feb 2010 22:42:55 +0100 Stefan Schmidt <[email protected]>…

Add some safety check for CONFIG_PM around zeus_power_off(). Without it linking can fail like this:

arch/arm/mach-pxa/built-in.o: In function `zeus_power_off':
e800.c:(.text+0x2bc8): undefined reference to `pxa27x_cpu_suspend'

Quoted 7 lines

--

This smells a bit fishy as zeus_power_off() is only mapped to pm_power_off and that one seems to come and go to nowhere. Is this any magic I don't get on a first glance?

The magic takes place in arch/arm/kernel/process.c.

Quoted 14 lines
---
 arch/arm/mach-pxa/zeus.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/zeus.c +1 -0
index 75f2a37..213279d 100644
@@ -621,11 +621,15 @@ static struct pxa2xx_udc_mach_info zeus_udc_info = {
 	.udc_command = zeus_udc_command,
 };
 
+#ifdef CONFIG_PM
 static void zeus_power_off(void)

arch/arm/mach-pxa/zeus.c static struct pxa2xx_udc_mach_info zeus_udc_info = { · line 635

Quoted 10 lines
arch/arm/mach-pxa/zeus.c +3 -0
 {
 	local_irq_disable();
 	pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP);
 }
+#else
+#define zeus_power_off   NULL
+#endif
 
 #ifdef CONFIG_APM_EMULATION
 static void zeus_get_power_status(struct apm_power_info *info)

Eric, are you willing to take this directly, or do you want me to queue it for the next merge window with the rest of the fixes?

	M.
Signature · 1 line
I'm the slime oozin' out from your TV set...
#2 lore raw

PATCH 2/2 arm/pxa: Let zeus.c link without CONFIG_PM enabled.

Hello.

Quoted 11 lines · Marc Zyngier
Quoted 8 lines · On Tue, 16 Feb 2010 22:42:55 +0100 Stefan Schmidt <[email protected]>…

Add some safety check for CONFIG_PM around zeus_power_off(). Without it linking can fail like this:

arch/arm/mach-pxa/built-in.o: In function `zeus_power_off':
e800.c:(.text+0x2bc8): undefined reference to `pxa27x_cpu_suspend'

Quoted 7 lines
Quoted 5 lines

--

This smells a bit fishy as zeus_power_off() is only mapped to pm_power_off and that one seems to come and go to nowhere. Is this any magic I don't get on a first glance?

The magic takes place in arch/arm/kernel/process.c.

Ah, thanks a lot. Something learned today. :)

regards
Stefan Schmidt

#3 lore raw

PATCH 2/2 arm/pxa: Let zeus.c link without CONFIG_PM enabled.

In reply to Marc Zyngier
Quoted 5 lines

Eric, are you willing to take this directly, or do you want me to queue it for the next merge window with the rest of the fixes?

With your Ack, I've applied this to 'devel'. The zeus can still be built with CONFIG_PM enabled, so I tend to include this for the next merge window instead of going into the -rc phase.

And note this doesn't look like a final fix to this issue, so you may want to work a bit on it some time later.

Please submit the rest of the fixes as we are close to the merge window. And thanks.