Skip to contentSkip to conversation

allow hibernation of I-pipe kernels

PATCH Applied Jan Kiszka 2 participants 2 messages Sep 15, 2007 – Oct 4, 2007

Subsystems (2)
lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 allow hibernation of I-pipe kernels

I'm using this patch since ages on my notebook. Would be nice to have this available by default.

Jan

---
 kernel/power/swsusp.c |    4 ++++
 1 file changed, 4 insertions(+)
kernel/power/swsusp.c +4 -0
Index: linux-2.6.22-ipipe/kernel/power/swsusp.c
===================================================================
@@ -278,6 +278,7 @@ int swsusp_suspend(void)
 		return error;
 
 	local_irq_disable();
+	local_irq_disable_hw_cond();
 	/* At this point, device_suspend() has been called, but *not*
 	 * device_power_down(). We *must* device_power_down() now.
 	 * Otherwise, drivers for some devices (e.g. interrupt controllers)
@@ -299,6 +300,7 @@ int swsusp_suspend(void)
 	 */
 	device_power_up();
  Enable_irqs:
+	local_irq_enable_hw_cond();
 	local_irq_enable();
 	return error;
 }
@@ -308,6 +310,7 @@ int swsusp_resume(void)
 	int error;
 
 	local_irq_disable();
+	local_irq_disable_hw_cond();
 	/* NOTE:  device_power_down() is just a suspend() with irqs off;
 	 * it has no special "power things down" semantics
 	 */
@@ -334,6 +337,7 @@ int swsusp_resume(void)
 	restore_processor_state();
 	touch_softlockup_watchdog();
 	device_power_up();
+	local_irq_enable_hw_cond();
 	local_irq_enable();
 	return error;
 }
#1 lore raw
Quoted 3 lines · Jan Kiszka

I'm using this patch since ages on my notebook. Would be nice to have this available by default.

Merged, thanks.

Quoted 1 line

Jan

Signature · 1 line
Philippe.