Skip to content

Commit

Permalink
sh: fix size calculation for NUMA node 0
Browse files Browse the repository at this point in the history
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: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Dec 9, 2009
1 parent f701b39 commit f3a4c00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void __init setup_memory(void)
{
unsigned long free_pfn = PFN_UP(__pa(_end));
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);

Expand Down

0 comments on commit f3a4c00

Please sign in to comment.