• J
    MIPS: Flush TLB handlers directly after writing them · a3d9086b
    Jonas Gorski 提交于
    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 3d8bfdd0
    ("MIPS: Use C0_KScratch (if present) to hold PGD pointer.").
    Signed-off-by: NJonas 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: NRalf Baechle <ralf@linux-mips.org>
    a3d9086b
traps.c 47.8 KB