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

Commit 1abd3502 authored by Russell King's avatar Russell King
Browse files

ARM: align .data section



Robert Jarzmik reports that his PXA25x system fails to boot with 4.12,
failing at __flush_whole_cache in arch/arm/mm/proc-xscale.S:215:

   0xc0019e20 <+0>:     ldr     r1, [pc, #788]
   0xc0019e24 <+4>:     ldr     r0, [r1]	<== here

with r1 containing 0xc06f82cd, which is the address of "clean_addr".
Examination of the System.map shows:

c06f22c8 D user_pmd_table
c06f22cc d __warned.19178
c06f22cd d clean_addr

indicating that a .data.unlikely section has appeared just before the
.data section from proc-xscale.S.  According to objdump -h, it appears
that our assembly files default their .data alignment to 2**0, which
is bad news if the preceding .data section size is not power-of-2
aligned at link time.

Add the appropriate .align directives to all assembly files in arch/arm
that are missing them where we require an appropriate alignment.

Reported-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Tested-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent ce184a0d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@
#define UART_OFFSET(addr)	((addr) & 0x00ffffff)

		.pushsection .data
		.align	2
omap_uart_phys:	.word	0
omap_uart_virt:	.word	0
omap_uart_lsr:	.word	0
+2 −0
Original line number Diff line number Diff line
@@ -721,6 +721,7 @@ do_fpe:
 */

	.pushsection .data
	.align	2
ENTRY(fp_enter)
	.word	no_fp
	.popsection
@@ -1221,6 +1222,7 @@ vector_addrexcptn:
	W(b)	vector_fiq

	.data
	.align	2

	.globl	cr_alignment
cr_alignment:
+2 −0
Original line number Diff line number Diff line
@@ -556,6 +556,7 @@ ENDPROC(__fixup_smp)
	.word	__smpalt_end

	.pushsection .data
	.align	2
	.globl	smp_on_up
smp_on_up:
	ALT_SMP(.long	1)
@@ -716,6 +717,7 @@ ENTRY(fixup_pv_table)
ENDPROC(fixup_pv_table)

	.data
	.align	2
	.globl	__pv_phys_pfn_offset
	.type	__pv_phys_pfn_offset, %object
__pv_phys_pfn_offset:
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
 * zeroing of .bss would clobber it.
 */
.data
	.align	2
ENTRY(__boot_cpu_mode)
	.long	0
.text
+1 −0
Original line number Diff line number Diff line
@@ -367,6 +367,7 @@ ENTRY(iwmmxt_task_release)
ENDPROC(iwmmxt_task_release)

	.data
	.align	2
concan_owner:
	.word	0
Loading