OSDN Git Service

mips: MAAR: Use more precise address mask
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Thu, 21 May 2020 00:34:37 +0000 (03:34 +0300)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 21 May 2020 07:06:05 +0000 (09:06 +0200)
commitbbb5946eb545fab8ad8f46bce8a803e1c0c39d47
tree9f674052c544dabcc939b95fd39ba79ba69629db
parent37e2bc4433a9d68f6d4c8e3fe5ef3a77609bbe8d
mips: MAAR: Use more precise address mask

Indeed according to the MIPS32 Privileged Resource Architecgture the MAAR
pair register address field either takes [12:31] bits for non-XPA systems
and [12:55] otherwise. In any case the current address mask is just
wrong for 64-bit and 32-bits XPA chips. So lets extend it to 59-bits
of physical address value. This shall cover the 64-bits architecture and
systems with XPA enabled, and won't cause any problem for non-XPA 32-bit
systems, since address values exceeding the architecture specific MAAR
mask will be just truncated with setting zeros in the unsupported upper
bits.

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: devicetree@vger.kernel.org
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/mipsregs.h