Skip to content

Commit 66b416e

Browse files
Thomas Bogendoerferpaulburton
authored andcommitted
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: a94e4f2 ("MIPS: init: Drop boot_mem_map") Signed-off-by: Thomas Bogendoerfer <[email protected]> Signed-off-by: Paul Burton <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: James Hogan <[email protected]> Cc: [email protected] Cc: [email protected]
1 parent 8919975 commit 66b416e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static void __init bootmem_init(void)
321321
* Reserve any memory between the start of RAM and PHYS_OFFSET
322322
*/
323323
if (ramstart > PHYS_OFFSET)
324-
memblock_reserve(PHYS_OFFSET, PFN_UP(ramstart) - PHYS_OFFSET);
324+
memblock_reserve(PHYS_OFFSET, ramstart - PHYS_OFFSET);
325325

326326
if (PFN_UP(ramstart) > ARCH_PFN_OFFSET) {
327327
pr_info("Wasting %lu bytes for tracking %lu unused pages\n",

0 commit comments

Comments
 (0)