MIPS: tlbex: Remove cpu_has_local_ebase
authorPaul Burton <paul.burton@mips.com>
Sat, 31 Aug 2019 15:40:46 +0000 (15:40 +0000)
committerPaul Burton <paul.burton@mips.com>
Tue, 3 Sep 2019 13:20:54 +0000 (14:20 +0100)
commit775b089aeffa98d5f69045d9dc4fe3aaba1bc9e1
treefcb3a10c600fa7bc1a0118e7f0be56d2f87d4131
parent54e8d9f07d8a4489e6ab148c3074ff10af03d3aa
MIPS: tlbex: Remove cpu_has_local_ebase

The cpu_has_local_ebase macro is, confusingly, not used to indicate
whether the EBase register is local to a CPU or not. Instead it
indicates whether we want to generate the TLB refill exception vector
each time a CPU is brought online. Doing this makes little sense on any
system, since we always use the same value for EBase & thus we cannot
have different TLB refill exception handlers per CPU.

Regenerating the code is not only pointless but also can be actively
harmful, as commit 8759934e2b6b ("MIPS: Build uasm-generated code only
once to avoid CPU Hotplug problem") described. That commit introduced
cpu_has_local_ebase to disable the handler regeneration for Loongson
machines, but this is by no means a Loongson-specific problem.

Remove cpu_has_local_ebase & simply generate the TLB refill handler once
during boot, just like the rest of the TLB exception handlers.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: linux-mips@vger.kernel.org
arch/mips/include/asm/cpu-features.h
arch/mips/include/asm/mach-dec/cpu-feature-overrides.h
arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h
arch/mips/mm/tlbex.c