From 3fb81e03c7d715c23579abdecb49ffebe5d7b148 Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Wed, 8 Jun 2011 15:53:34 +0100 Subject: [PATCH] --- yaml --- r: 279892 b: refs/heads/master c: 2c8951ab0c337cb198236df07ad55f9dd4892c26 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mm/idmap.c | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index cff15c7a5b8a..1a76e81370bb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1a4baafa7d203da1cceb302c2df38f0fea1c17a1 +refs/heads/master: 2c8951ab0c337cb198236df07ad55f9dd4892c26 diff --git a/trunk/arch/arm/mm/idmap.c b/trunk/arch/arm/mm/idmap.c index cda5ea3157a7..b01760e6da18 100644 --- a/trunk/arch/arm/mm/idmap.c +++ b/trunk/arch/arm/mm/idmap.c @@ -100,17 +100,18 @@ static int __init init_static_idmap(void) arch_initcall(init_static_idmap); /* - * In order to soft-boot, we need to insert a 1:1 mapping in place of - * the user-mode pages. This will then ensure that we have predictable - * results when turning the mmu off + * In order to soft-boot, we need to switch to a 1:1 mapping for the + * cpu_reset functions. This will then ensure that we have predictable + * results when turning off the mmu. */ void setup_mm_for_reboot(void) { - /* - * We need to access to user-mode page tables here. For kernel threads - * we don't have any user-mode mappings so we use the context that we - * "borrowed". - */ - identity_mapping_add(current->active_mm->pgd, 0, TASK_SIZE); + /* Clean and invalidate L1. */ + flush_cache_all(); + + /* Switch to the identity mapping. */ + cpu_switch_mm(idmap_pgd, &init_mm); + + /* Flush the TLB. */ local_flush_tlb_all(); }