Patchwork powerpc/mm: fix the call trace when resumed from hibernation

mail settings
Submitter tang yuantian
Date Aug. 17, 2011, 5:51 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/110307/
State Accepted, archived
Delegated to: Benjamin Herrenschmidt
Headers show


tang yuantian - Aug. 17, 2011, 5:51 a.m.
From: Tang Yuantian <>

	In SMP mode, the kernel would produce call trace when resumed
	from hibernation. The reason is when the function destroy_context
	is called to drop the resuming mm context, the mm->
	is 1 which is wrong and should be zero.
	We pass the current->active_mm as previous mm context to function
	switch_mmu_context to decrease the by 1.

	In UP mode, there is no effect.

Signed-off-by: Tang Yuantian <>
 arch/powerpc/kernel/swsusp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/arch/powerpc/kernel/swsusp.c b/arch/powerpc/kernel/swsusp.c
index 560c961..7cc81f0 100644
--- a/arch/powerpc/kernel/swsusp.c
+++ b/arch/powerpc/kernel/swsusp.c
@@ -34,6 +34,6 @@  void save_processor_state(void)
 void restore_processor_state(void)
 #ifdef CONFIG_PPC32
-	switch_mmu_context(NULL, current->active_mm);
+	switch_mmu_context(current->active_mm, current->active_mm);