MIPS: Loongson64: Handle more memory types passed from firmware
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Tue, 7 Nov 2023 11:15:20 +0000 (11:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:39:29 +0000 (18:39 +0100)
commitd52a5178cbdcfd2e5e3f6a501353bc86973bd644
tree07635a986b058bb365b7ccb7464306966aa2dfbe
parent8d18a0158546b72094c98dfb2d1d987d1799e8ab
MIPS: Loongson64: Handle more memory types passed from firmware

commit c7206e7bd214ebb3ca6fa474a4423662327d9beb upstream.

There are many types of revsered memory passed from firmware
that should be reserved in memblock, and UMA memory passed
from firmware that should be added to system memory for system
to use.

Also for memblock there is no need to align those space into page,
which actually cause problems.

Handle them properly to prevent memory corruption on some systems.

Cc: stable@vger.kernel.org
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/include/asm/mach-loongson64/boot_param.h
arch/mips/loongson64/init.c