xtensa: fix boot parameters address translation
authorMax Filippov <jcmvbkbc@gmail.com>
Wed, 14 Nov 2018 07:46:42 +0000 (23:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:24:06 +0000 (09:24 +0100)
commitfa68fdf0a20137a416f5a5cce72aed098faa6858
tree245bd05fa681fcdb27c8adb3054d1c6fc5caebfa
parentf221f7b447f34778647bef9db70eed71648d4f28
xtensa: fix boot parameters address translation

commit 40dc948f234b73497c3278875eb08a01d5854d3f upstream.

The bootloader may pass physical address of the boot parameters structure
to the MMUv3 kernel in the register a2. Code in the _SetupMMU block in
the arch/xtensa/kernel/head.S is supposed to map that physical address to
the virtual address in the configured virtual memory layout.

This code haven't been updated when additional 256+256 and 512+512
memory layouts were introduced and it may produce wrong addresses when
used with these layouts.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/xtensa/kernel/head.S