projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18836b4
)
MIPS: fix memory setup for platforms with PHYS_OFFSET != 0
author
Thomas Bogendoerfer
<
[email protected]
>
Wed, 27 Feb 2019 09:42:56 +0000
(10:42 +0100)
committer
Paul Burton
<
[email protected]
>
Thu, 28 Feb 2019 02:49:29 +0000
(18:49 -0800)
For platforms, which use a PHYS_OFFSET != 0, symbol _end also
contains that offset. So when calling memblock_reserve() for
reserving kernel the size argument needs to be adjusted.
Fixes: bcec54bf3118 ("mips: switch to NO_BOOTMEM")
Acked-by: Mike Rapoport <
[email protected]
>
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]
Cc: Mike Rapoport <
[email protected]
>
Cc:
[email protected]
# v4.20+
arch/mips/kernel/setup.c
patch
|
blob
|
history
diff --git
a/arch/mips/kernel/setup.c
b/arch/mips/kernel/setup.c
index 8c6c48ed786a1527c22ba5b46bcdad70029e5865..d2e5a5ad0e6f5e4b90e5f1a20c7942f40a1c735d 100644
(file)
--- a/
arch/mips/kernel/setup.c
+++ b/
arch/mips/kernel/setup.c
@@
-384,7
+384,8
@@
static void __init bootmem_init(void)
init_initrd();
reserved_end = (unsigned long) PFN_UP(__pa_symbol(&_end));
- memblock_reserve(PHYS_OFFSET, reserved_end << PAGE_SHIFT);
+ memblock_reserve(PHYS_OFFSET,
+ (reserved_end << PAGE_SHIFT) - PHYS_OFFSET);
/*
* max_low_pfn is not a number of pages. The number of pages