Skip to contentSkip to conversation

sh: fix size calculation for NUMA node 0

PATCH In review Magnus Damm 2 participants 2 messages Dec 7, 2009 – Dec 9, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: fix size calculation for NUMA node 0

From: Magnus Damm <[email protected]>

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.

---

 arch/sh/mm/numa.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/mm/numa.c +1 -1
@@ -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);
 
#1 lore raw
Quoted 3 lines · Magnus Damm

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.

Quoted 3 lines · Magnus Damm

This patch updates the NUMA version of setup_memory() with UMA code changes and also modifies the last argument to lmb_alloc_base() to use an address instead of pfn.

Quoted 5 lines · Magnus Damm

This patch adds a ->start_transfer() callback to the driver sh_mobile_lcdcfb.c. The callback is used to program the LCDC panel in the case of one-shot mode.

Needed by the LCD controller used on the KFR2R09 board.

Quoted 9 lines · Magnus Damm

This patch adds a ->start_transfer() callback to the KFR2R09 lcd handling code. The callback is used to notify the lcd controller that a new frame of data is about to be transferred. The callback is only used in combination with deferred io, but the code has been tested both with and without deferred io enabled.

Without this patch the display data on the KFR2R09 lcd panel becomes corrupted over time.

All applied, thanks.