]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix HTW config on XPA kernel without LPA enabled
authorJames Hogan <james.hogan@imgtec.com>
Tue, 19 Apr 2016 08:25:00 +0000 (09:25 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 12:02:24 +0000 (14:02 +0200)
commit257aa5cb92c45601aa577e81aa669a84b738cb7b
tree13104303036707ae305ed320d008ef2c53225e3c
parent67b34e674e939de68f7581fb39fb5163b7fe1b89
MIPS: Fix HTW config on XPA kernel without LPA enabled

The hardware page table walker (HTW) configuration is broken on XPA
kernels where XPA couldn't be enabled (either nohtw or the hardware
doesn't support it). This is because the PWSize.PTEW field (PTE width)
was only set to 8 bytes (an extra shift of 1) in config_htw_params() if
PageGrain.ELPA (enable large physical addressing) is set. On an XPA
kernel though the size of PTEs is fixed at 8 bytes regardless of whether
XPA could actually be enabled.

Fix the initialisation of this field based on sizeof(pte_t) instead.

Fixes: 620119a62535 ("MIPS: Add support for XPA.")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Steven J. Hill <sjhill@realitydiluted.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/13113/
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/tlbex.c