The main motivation for this patch set is to optimize the tlb refill handler in the case where it would be split on an eret instruction. However, it was brought to my attention that the existing code was a bit cryptic, so I start by trying to clean up the existing code before patching it. The first patch should be purely cosmetic, and the second adds the optimization. I will reply with the two patches. David Daney (2): MIPS: Replace some magic numbers with symbolic values in tlbex.c MIPS: Don't branch to eret in TLB refill. arch/mips/mm/tlbex.c | 80 +++++++++++++++++++++++++++++++++++--------------- 1 files changed, 56 insertions(+), 24 deletions(-)