]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/mm: Fix the call trace when resumed from hibernation
authorTang Yuantian <B29983@freescale.com>
Tue, 16 Aug 2011 19:51:33 +0000 (19:51 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 19 Sep 2011 23:19:58 +0000 (09:19 +1000)
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->context.active
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 context.active by 1.

In UP mode, there is no effect.

Signed-off-by: Tang Yuantian <b29983@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/swsusp.c

index aa17b76dd42799375ce954490526b00e5262de06..641f9adc620596e46d6b59b5f725643ce8124ad5 100644 (file)
@@ -33,6 +33,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);
 #endif
 }