From patchwork Wed Aug 17 05:51:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tang yuantian X-Patchwork-Id: 110307 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id B1910B74C4 for ; Wed, 17 Aug 2011 21:04:09 +1000 (EST) Received: from VA3EHSOBE005.bigfish.com (va3ehsobe005.messaging.microsoft.com [216.32.180.31]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 18A8DB6F62 for ; Wed, 17 Aug 2011 16:56:00 +1000 (EST) Received: from mail19-va3-R.bigfish.com (10.7.14.247) by VA3EHSOBE005.bigfish.com (10.7.40.25) with Microsoft SMTP Server id 14.1.225.22; Wed, 17 Aug 2011 06:55:54 +0000 Received: from mail19-va3 (localhost.localdomain [127.0.0.1]) by mail19-va3-R.bigfish.com (Postfix) with ESMTP id 2F86D7B80A1; Wed, 17 Aug 2011 06:55:53 +0000 (UTC) X-SpamScore: -5 X-BigFish: VS-5(z6c9Mzzz1202hzz8275bhz2dh2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail19-va3 (localhost.localdomain [127.0.0.1]) by mail19-va3 (MessageSwitch) id 1313564111342158_26116; Wed, 17 Aug 2011 06:55:11 +0000 (UTC) Received: from VA3EHSMHS002.bigfish.com (unknown [10.7.14.238]) by mail19-va3.bigfish.com (Postfix) with ESMTP id A9FFDC6806F; Wed, 17 Aug 2011 06:52:42 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS002.bigfish.com (10.7.99.12) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 17 Aug 2011 06:52:40 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.323.2; Wed, 17 Aug 2011 01:52:39 -0500 Received: from localhost (rock.ap.freescale.net [10.193.20.106]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p7H6qbN0017858; Wed, 17 Aug 2011 01:52:38 -0500 (CDT) From: To: Subject: [PATCH] powerpc/mm: fix the call trace when resumed from hibernation Date: Wed, 17 Aug 2011 13:51:33 +0800 Message-ID: <1313560293-31874-1-git-send-email-b29983@freescale.com> X-Mailer: git-send-email 1.6.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Mailman-Approved-At: Wed, 17 Aug 2011 21:04:02 +1000 Cc: Tang Yuantian , linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org 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->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 --- 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 }