Skip to content

Commit

Permalink
powerpc/mm: Fix the call trace when resumed from hibernation
Browse files Browse the repository at this point in the history
	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>
  • Loading branch information
Tang Yuantian authored and Benjamin Herrenschmidt committed Sep 19, 2011
1 parent 9c57a32 commit 0330581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/swsusp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 0330581

Please sign in to comment.