From 41e71b71f4d7c2a370c7bee15ac0821983b0530f Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Thu, 8 Nov 2012 19:46:07 +0100 Subject: [PATCH] --- yaml --- r: 339511 b: refs/heads/master c: e40678559fdf3f56ce9a349365fbf39e1f63ecc0 h: refs/heads/master i: 339509: 257ea41318ea892d27ef7cabfa38c677d8d50da5 339507: d02fb80ebcb6e6f7e3bea72bc4a1fc9b69f1f615 339503: 583416aa03ef5b5ffa8916d0e277fef875243fe7 v: v3 --- [refs] | 2 +- trunk/arch/arm/mm/idmap.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index e64603b82365..496a92b41d39 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b62655f4c6f3e4d21934eee14ac2ac5cd479c97c +refs/heads/master: e40678559fdf3f56ce9a349365fbf39e1f63ecc0 diff --git a/trunk/arch/arm/mm/idmap.c b/trunk/arch/arm/mm/idmap.c index ab88ed4f8e08..99db769307ec 100644 --- a/trunk/arch/arm/mm/idmap.c +++ b/trunk/arch/arm/mm/idmap.c @@ -92,6 +92,9 @@ static int __init init_static_idmap(void) (long long)idmap_start, (long long)idmap_end); identity_mapping_add(idmap_pgd, idmap_start, idmap_end); + /* Flush L1 for the hardware to see this page table content */ + flush_cache_louis(); + return 0; } early_initcall(init_static_idmap); @@ -103,12 +106,15 @@ early_initcall(init_static_idmap); */ void setup_mm_for_reboot(void) { - /* Clean and invalidate L1. */ - flush_cache_all(); - /* Switch to the identity mapping. */ cpu_switch_mm(idmap_pgd, &init_mm); - /* Flush the TLB. */ +#ifdef CONFIG_CPU_HAS_ASID + /* + * We don't have a clean ASID for the identity mapping, which + * may clash with virtual addresses of the previous page tables + * and therefore potentially in the TLB. + */ local_flush_tlb_all(); +#endif }