summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-09-24 17:19:56 +0200
committerPaul Burton <paul.burton@mips.com>2019-10-02 23:10:16 +0200
commit66b416ee41ed7a8216e5234a96288dbb8124e4b6 (patch)
tree136a9fd293ec2b047161c0ec9a1c57264a4490a3 /arch/mips
parentMIPS: VDSO: Fix build for binutils < 2.25 (diff)
downloadlinux-66b416ee41ed7a8216e5234a96288dbb8124e4b6.tar.xz
linux-66b416ee41ed7a8216e5234a96288dbb8124e4b6.zip
MIPS: init: Fix reservation of memory between PHYS_OFFSET and mem start
Fix calculation of the size for reserving memory between PHYS_OFFSET and real memory start. Fixes: a94e4f24ec83 ("MIPS: init: Drop boot_mem_map") Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index b8249c233754..f5c6b4c6de24 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -321,7 +321,7 @@ static void __init bootmem_init(void)
* Reserve any memory between the start of RAM and PHYS_OFFSET
*/
if (ramstart > PHYS_OFFSET)
- memblock_reserve(PHYS_OFFSET, PFN_UP(ramstart) - PHYS_OFFSET);
+ memblock_reserve(PHYS_OFFSET, ramstart - PHYS_OFFSET);
if (PFN_UP(ramstart) > ARCH_PFN_OFFSET) {
pr_info("Wasting %lu bytes for tracking %lu unused pages\n",