]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Flush TLB handlers directly after writing them
authorJonas Gorski <jogo@openwrt.org>
Fri, 21 Jun 2013 17:48:48 +0000 (17:48 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 25 Jun 2013 15:48:06 +0000 (17:48 +0200)
commit157f6db4c324fcc0f488ec259a63a0226e6d1a79
tree99f9d81a1781e4a563dd4a20277ec4a99a49668f
parent620154e63ada942c32b9503cc16302a5d69d559a
MIPS: Flush TLB handlers directly after writing them

When having enabled MIPS_PGD_C0_CONTEXT, trap_init() might call the
generated tlbmiss_handler_setup_pgd before it was committed to memory,
causing boot failures:

  trap_init()
   |- per_cpu_trap_init()
   |   |- TLBMISS_HANDLER_SETUP()
   |       |- tlbmiss_handler_setup_pgd()
   |- flush_tlb_handlers()

To avoid this, move flush_tlb_handlers() into build_tlb_refill_handler()
right after they were generated. We can do this as the cache handling is
initialized just before creating the tlb handlers.

This issue was introduced in bd6fa06101dba374ed28b73cfd1dd13c83ed597a
("MIPS: Use C0_KScratch (if present) to hold PGD pointer.").

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Jayachandran C <jchandra@broadcom.com>
Cc: David Daney <david.daney@cavium.com>
Patchwork: https://patchwork.linux-mips.org/patch/5539/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/traps.c
arch/mips/mm/tlbex.c