Skip to content

Commit

Permalink
ARM: 7139/1: fix compilation with CONFIG_ARM_ATAG_DTB_COMPAT and larg…
Browse files Browse the repository at this point in the history
…e TEXT_OFFSET

If TEXT_OFFSET is too large (e.g. like on MSM) the resulting immediate
argument gets wider than 8 bits.

Noticed by David Brown <davidb@codeaurora.org>

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Nicolas Pitre authored and Russell King committed Oct 24, 2011
1 parent 34471a9 commit 531a6a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ restart: adr r0, LC0
* of RAM and hope for the best.
*/
cmp r0, #1
sub r0, r4, #(TEXT_OFFSET - 0x100)
sub r0, r4, #TEXT_OFFSET
add r0, r0, #0x100
mov r1, r6
sub r2, sp, r6
blne atags_to_fdt
Expand Down

0 comments on commit 531a6a9

Please sign in to comment.