Thread (9 messages) flat view 9 messages, 2 authors, 2011-07-12
STALE5523d

[RFC PATCH 1/7] powerpc: ppc440 remove zero physical memory base assumption

From: Michal Simek <monstr@monstr.eu>
Date: 2011-06-16 14:14:37
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

From: John Williams <redacted>

The macro PHYSICAL_START is available in this context, currently always with
the value zero.  However, that will change in a future patchset.

For now, just remove the zero physical address start assumption in head_44x.S
where we setup the initial TLB, and in the later MMU setup where we map in
the remainder of low mem if required.

Signed-off-by: John Williams <redacted>
---
 arch/powerpc/kernel/head_44x.S |    5 +++--
 arch/powerpc/mm/44x_mmu.c      |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 18d8a16..d80ce05 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -135,8 +135,9 @@ skpinv:	addi	r4,r4,1				/* Increment */
 	lis	r3,PAGE_OFFSET@h
 	ori	r3,r3,PAGE_OFFSET@l
 
-	/* Kernel is at the base of RAM */
-	li r4, 0			/* Load the kernel physical address */
+	/* Kernel is at PHYSICAL_START */
+	lis	r4,PHYSICAL_START@h
+	ori	r4,r4,PHYSICAL_START@l
 
 	/* Load the kernel PID = 0 */
 	li	r0,0
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index 98052ac..4a55061 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -94,7 +94,7 @@ unsigned long __init mmu_mapin_ram(void)
 
 	/* Pin in enough TLBs to cover any lowmem not covered by the
 	 * initial 256M mapping established in head_44x.S */
-	for (addr = PPC_PIN_SIZE; addr < lowmem_end_addr;
+	for (addr = PHYSICAL_START + PPC_PIN_SIZE; addr < lowmem_end_addr;
 	     addr += PPC_PIN_SIZE)
 		ppc44x_pin_tlb(addr + PAGE_OFFSET, addr);
 
-- 
1.5.5.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help