Skip to contentSkip to conversation

ARM: no need for nommu to jump through the hoops that mmu does

PATCH New Russell King - ARM Linux 2 participants 2 messages Oct 4, 2010 – Oct 6, 2010 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/10 ARM: no need for nommu to jump through the hoops that mmu does

nommu can jump directly to __mmap_switched without the absolute address branching which the mmuful kernel does.

---
 arch/arm/kernel/head-nommu.S |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
arch/arm/kernel/head-nommu.S +1 -4
index 573b803..814ce1a 100644
@@ -48,8 +48,6 @@ ENTRY(stext)
 	movs	r8, r5				@ invalid machine (r5=0)?
 	beq	__error_a			@ yes, error 'a'
 
-	ldr	r13, __switch_data		@ address to jump to after
-						@ the initialization is done
 	adr	lr, BSYM(__after_proc_init)	@ return (PIC) address
  ARM(	add	pc, r10, #PROCINFO_INITFUNC	)
  THUMB(	add	r12, r10, #PROCINFO_INITFUNC	)
@@ -87,8 +85,7 @@ __after_proc_init:
 	mcr	p15, 0, r0, c1, c0, 0		@ write control reg
 #endif /* CONFIG_CPU_CP15 */
 
-	mov	r3, r13
-	mov	pc, r3				@ clear the BSS and jump
+	b	__mmap_switched			@ clear the BSS and jump
 						@ to start_kernel
 ENDPROC(__after_proc_init)
 	.ltorg
Signature · 1 line
1.6.2.5
#1 lore raw

PATCH 1/10 ARM: no need for nommu to jump through the hoops that mmu does

Quoted 4 lines · Russell King - ARM Linux

nommu can jump directly to __mmap_switched without the absolute address branching which the mmuful kernel does.

Quoted 26 lines
  arch/arm/kernel/head-nommu.S |    5 +----
  1 files changed, 1 insertions(+), 4 deletions(-)
arch/arm/kernel/head-nommu.S +1 -4
index 573b803..814ce1a 100644
@@ -48,8 +48,6 @@ ENTRY(stext)
  	movs	r8, r5				@ invalid machine (r5=0)?
  	beq	__error_a			@ yes, error 'a'
 
-	ldr	r13, __switch_data		@ address to jump to after
-						@ the initialization is done
  	adr	lr, BSYM(__after_proc_init)	@ return (PIC) address
   ARM(	add	pc, r10, #PROCINFO_INITFUNC	)
   THUMB(	add	r12, r10, #PROCINFO_INITFUNC	)
@@ -87,8 +85,7 @@ __after_proc_init:
  	mcr	p15, 0, r0, c1, c0, 0		@ write control reg
  #endif /* CONFIG_CPU_CP15 */
 
-	mov	r3, r13
-	mov	pc, r3				@ clear the BSS and jump
+	b	__mmap_switched			@ clear the BSS and jump
  						@ to start_kernel
  ENDPROC(__after_proc_init)
  	.ltorg
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg at snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com