OSDN Git Service

MIPS: mm: fixed mappings: correct initialisation
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>
Tue, 11 Apr 2017 07:00:34 +0000 (09:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:24 +0000 (19:48 +0200)
commit222c8b45a69c8be582d0a5b282dcc28387b6c72e
tree6002a4917abd9a4963ac40633496b3b27f3968b3
parent0559ea3414d146426aa7e5a95584eee50b1cf967
MIPS: mm: fixed mappings: correct initialisation

[ Upstream commit 71eb989ab5a110df8bcbb9609bacde73feacbedd ]

fixrange_init operates at PMD-granularity and expects the addresses to
be PMD-size aligned, but currently that might not be the case for
PKMAP_BASE unless it is defined properly, so ensure a correct alignment
is used before passing the address to fixrange_init.

fixed mappings: only align the start address that is passed to
fixrange_init rather than the value before adding the size, as we may
end up with uninitialised upper part of the range.

Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/15948/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/mm/pgtable-32.c