Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf35706f authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Russell King
Browse files

ARM: 8314/1: replace PROCINFO embedded branch with relative offset



This patch replaces the 'branch to setup()' instructions embedded
in the PROCINFO structs with the offset to that setup function
relative to the base of the struct. This preserves the position
independent nature of that field, but uses a data item rather
than an instruction.

This is mainly done to prevent linker failures on large kernels,
where the setup function is out of reach for the branch.

Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 0a6a78b8
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -138,9 +138,9 @@ ENTRY(stext)
						@ mmu has been enabled
	adr	lr, BSYM(1f)			@ return (PIC) address
	mov	r8, r4				@ set TTBR1 to swapper_pg_dir
 ARM(	add	pc, r10, #PROCINFO_INITFUNC	)
 THUMB(	add	r12, r10, #PROCINFO_INITFUNC	)
 THUMB(	ret	r12				)
	ldr	r12, [r10, #PROCINFO_INITFUNC]
	add	r12, r12, r10
	ret	r12
1:	b	__enable_mmu
ENDPROC(stext)
	.ltorg
@@ -386,10 +386,10 @@ ENTRY(secondary_startup)
	ldr	r8, [r7, lr]			@ get secondary_data.swapper_pg_dir
	adr	lr, BSYM(__enable_mmu)		@ return address
	mov	r13, r12			@ __secondary_switched address
 ARM(	add	pc, r10, #PROCINFO_INITFUNC	) @ initialise processor
	ldr	r12, [r10, #PROCINFO_INITFUNC]
	add	r12, r12, r10			@ initialise processor
						@ (return control reg)
 THUMB(	add	r12, r10, #PROCINFO_INITFUNC	)
 THUMB(	ret	r12				)
	ret	r12
ENDPROC(secondary_startup)
ENDPROC(secondary_startup_arm)

+2 −2
Original line number Diff line number Diff line
@@ -507,7 +507,7 @@ cpu_arm1020_name:

	.align

	.section ".proc.info.init", #alloc, #execinstr
	.section ".proc.info.init", #alloc

	.type	__arm1020_proc_info,#object
__arm1020_proc_info:
@@ -519,7 +519,7 @@ __arm1020_proc_info:
	.long   PMD_TYPE_SECT | \
		PMD_SECT_AP_WRITE | \
		PMD_SECT_AP_READ
	b	__arm1020_setup
	initfn	__arm1020_setup, __arm1020_proc_info
	.long	cpu_arch_name
	.long	cpu_elf_name
	.long	HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB
+2 −2
Original line number Diff line number Diff line
@@ -465,7 +465,7 @@ arm1020e_crval:

	.align

	.section ".proc.info.init", #alloc, #execinstr
	.section ".proc.info.init", #alloc

	.type	__arm1020e_proc_info,#object
__arm1020e_proc_info:
@@ -479,7 +479,7 @@ __arm1020e_proc_info:
		PMD_BIT4 | \
		PMD_SECT_AP_WRITE | \
		PMD_SECT_AP_READ
	b	__arm1020e_setup
	initfn	__arm1020e_setup, __arm1020e_proc_info
	.long	cpu_arch_name
	.long	cpu_elf_name
	.long	HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_EDSP
+2 −2
Original line number Diff line number Diff line
@@ -448,7 +448,7 @@ arm1022_crval:

	.align

	.section ".proc.info.init", #alloc, #execinstr
	.section ".proc.info.init", #alloc

	.type	__arm1022_proc_info,#object
__arm1022_proc_info:
@@ -462,7 +462,7 @@ __arm1022_proc_info:
		PMD_BIT4 | \
		PMD_SECT_AP_WRITE | \
		PMD_SECT_AP_READ
	b	__arm1022_setup
	initfn	__arm1022_setup, __arm1022_proc_info
	.long	cpu_arch_name
	.long	cpu_elf_name
	.long	HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_EDSP
+2 −2
Original line number Diff line number Diff line
@@ -442,7 +442,7 @@ arm1026_crval:
	string	cpu_arm1026_name, "ARM1026EJ-S"
	.align

	.section ".proc.info.init", #alloc, #execinstr
	.section ".proc.info.init", #alloc

	.type	__arm1026_proc_info,#object
__arm1026_proc_info:
@@ -456,7 +456,7 @@ __arm1026_proc_info:
		PMD_BIT4 | \
		PMD_SECT_AP_WRITE | \
		PMD_SECT_AP_READ
	b	__arm1026_setup
	initfn	__arm1026_setup, __arm1026_proc_info
	.long	cpu_arch_name
	.long	cpu_elf_name
	.long	HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA
Loading