From patchwork Mon Mar 25 18:19:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 2333081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 4C850DF24C for ; Mon, 25 Mar 2013 18:27:59 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UKC4i-0004AS-P0; Mon, 25 Mar 2013 18:24:52 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UKBzQ-0001NZ-Mf for linux-arm-kernel@lists.infradead.org; Mon, 25 Mar 2013 18:19:25 +0000 Received: from mudshark.cambridge.arm.com (mudshark.cambridge.arm.com [10.1.79.58]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id r2PIJMki013053; Mon, 25 Mar 2013 18:19:22 GMT Received: by mudshark.cambridge.arm.com (Postfix, from userid 1000) id CF479C2B14; Mon, 25 Mar 2013 18:19:13 +0000 (GMT) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] ARM: tegra: use setup_mm_for_reboot rather than explicit pgd switch Date: Mon, 25 Mar 2013 18:19:11 +0000 Message-Id: <1364235552-17851-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 1.8.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130325_141924_997048_9AD361DF X-CRM114-Status: GOOD ( 10.97 ) X-Spam-Score: -8.2 (--------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-8.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.96.50 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.3 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-tegra@vger.kernel.org, Will Deacon , Stephen Warren X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch changes the Tegra PM code to use the setup_mm_for_reboot helper rather than call cpu_switch_mm directly. This keeps things like TLB invalidation in one place. Cc: Stephen Warren Signed-off-by: Will Deacon --- arch/arm/mach-tegra/pm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c index 523604d..a77ed48 100644 --- a/arch/arm/mach-tegra/pm.c +++ b/arch/arm/mach-tegra/pm.c @@ -183,12 +183,7 @@ bool tegra_set_cpu_in_lp2(int phy_cpu_id) static int tegra_sleep_cpu(unsigned long v2p) { - /* Switch to the identity mapping. */ - cpu_switch_mm(idmap_pgd, &init_mm); - - /* Flush the TLB. */ - local_flush_tlb_all(); - + setup_mm_for_reboot(); tegra_sleep_cpu_finish(v2p); /* should never here */