linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: <b29983@freescale.com>
To: <benh@kernel.crashing.org>
Cc: Tang Yuantian <b29983@freescale.com>, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH] powerpc/mm: fix the call trace when resumed from hibernation
Date: Wed, 17 Aug 2011 13:51:33 +0800	[thread overview]
Message-ID: <1313560293-31874-1-git-send-email-b29983@freescale.com> (raw)

From: Tang Yuantian <B29983@freescale.com>

	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>
---
 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);
 #endif
 }
-- 
1.6.4

                 reply	other threads:[~2011-08-17  6:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313560293-31874-1-git-send-email-b29983@freescale.com \
    --to=b29983@freescale.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).