diff options
author | Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> | 2014-07-11 18:18:05 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-08-01 12:52:16 -0400 |
commit | 1062080a7d8dbe08cefce728341285e77930ef49 (patch) | |
tree | 6042a763266cf9e1d444ce263e11df2ca74c9a4d /arch/mips | |
parent | c7fb97d65aece5b03a9209ea5a9670e952c62f34 (diff) |
MIPS: bugfix: missed cache flush of TLB refill handler
Commit
Commit 1d40cfcd3442a53e98468cdb3e6d4d9a568d76cf
Author: Ralf Baechle <ralf@linux-mips.org>
Date: Fri Jul 15 15:23:23 2005 +0000
Avoid SMP cacheflushes. This is a minor optimization of startup but
will also avoid smp_call_function from doing stupid things when called
from a CPU that is not yet marked online.
missed an appropriate cache flush of TLB refill handler because that time it was
at fixed location CAC_BASE. After years the refill handler in EBASE vector
is not at that location and can be allocated in some another memory and needs
I-cache sync as other TLB exception vectors.
Besides that, the new function - local_flash_icache_range() was introduced
to avoid SMP cacheflushes.
Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: paul.gortmaker@windriver.com
Cc: jchandra@broadcom.com
Cc: linux-kernel@vger.kernel.org
Cc: david.daney@cavium.com
Patchwork: https://patchwork.linux-mips.org/patch/7312/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/mm/tlbex.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 343fe0f559b1..cf8a9525f0fa 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -429,6 +429,7 @@ static void build_r3000_tlb_refill_handler(void) | |||
429 | (unsigned int)(p - tlb_handler)); | 429 | (unsigned int)(p - tlb_handler)); |
430 | 430 | ||
431 | memcpy((void *)ebase, tlb_handler, 0x80); | 431 | memcpy((void *)ebase, tlb_handler, 0x80); |
432 | local_flush_icache_range(ebase, ebase + 0x80); | ||
432 | 433 | ||
433 | dump_handler("r3000_tlb_refill", (u32 *)ebase, 32); | 434 | dump_handler("r3000_tlb_refill", (u32 *)ebase, 32); |
434 | } | 435 | } |
@@ -1416,6 +1417,7 @@ static void build_r4000_tlb_refill_handler(void) | |||
1416 | final_len); | 1417 | final_len); |
1417 | 1418 | ||
1418 | memcpy((void *)ebase, final_handler, 0x100); | 1419 | memcpy((void *)ebase, final_handler, 0x100); |
1420 | local_flush_icache_range(ebase, ebase + 0x100); | ||
1419 | 1421 | ||
1420 | dump_handler("r4000_tlb_refill", (u32 *)ebase, 64); | 1422 | dump_handler("r4000_tlb_refill", (u32 *)ebase, 64); |
1421 | } | 1423 | } |