提交 f3a4c00a 编写于 作者: M Magnus Damm 提交者: Paul Mundt

sh: fix size calculation for NUMA node 0

Fix the NUMA size calculation for node 0. Do the same
as the UMA version of setup_memory() and use address
instead of pfn when calculating the size.
Signed-off-by: NMagnus Damm <damm@opensource.se>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 f701b399
...@@ -28,7 +28,7 @@ void __init setup_memory(void) ...@@ -28,7 +28,7 @@ void __init setup_memory(void)
{ {
unsigned long free_pfn = PFN_UP(__pa(_end)); unsigned long free_pfn = PFN_UP(__pa(_end));
u64 base = min_low_pfn << PAGE_SHIFT; u64 base = min_low_pfn << PAGE_SHIFT;
u64 size = (max_low_pfn << PAGE_SHIFT) - min_low_pfn; u64 size = (max_low_pfn << PAGE_SHIFT) - base;
lmb_add(base, size); lmb_add(base, size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册