mips: MAAR: Add XPA mode support
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Wed, 6 May 2020 17:42:30 +0000 (20:42 +0300)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 19 May 2020 15:39:32 +0000 (17:39 +0200)
commit9ee195fd1be87719e5fcda4cbd7ba4454249f04f
tree5ef3b3fcdd40e6dc231c1b90e4214c171877ae84
parentbd6e38983bb76a48604b7a4f0740354158217bd3
mips: MAAR: Add XPA mode support

When XPA mode is enabled the normally 32-bits MAAR pair registers
are extended to be of 64-bits width as in pure 64-bits MIPS
architecture. In this case the MAAR registers can enable the
speculative loads/stores for addresses of up to 39-bits width.
But in this case the process of the MAAR initialization changes a bit.
The upper 32-bits of the registers are supposed to be accessed by mean
of the dedicated instructions mfhc0/mthc0 and there is a CP0.MAAR.VH
bit which should be set together with CP0.MAAR.VL as indication
of the boundary validity. All of these peculiarities were taken into
account in this commit so the speculative loads/stores would work
when XPA mode is enabled.

Co-developed-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Signed-off-by: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-pm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/maar.h
arch/mips/include/asm/mipsregs.h
arch/mips/mm/init.c