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:45:35 +0000 (18:45 +0100)
commit264927e3538169fe2973a5732f03ea01b0f9f9e8
tree0236e762ab6d3534bb92c7d5687e06d557bf1d08
parentae07e7d338c474cb6daf798618b33b6a346a88a0
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