linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh: fix size calculation for NUMA node 0
@ 2009-12-07 14:11 Magnus Damm
  2009-12-09  3:45 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2009-12-07 14:11 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@opensource.se>

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>
---

 arch/sh/mm/numa.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 0001/arch/sh/mm/numa.c
+++ work/arch/sh/mm/numa.c	2009-12-07 21:13:58.000000000 +0900
@@ -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);
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-09  3:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 14:11 [PATCH] sh: fix size calculation for NUMA node 0 Magnus Damm
2009-12-09  3:45 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).