From 531a6a941745e1e045dd2a6bd09e1dc01247a5f3 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Mon, 24 Oct 2011 13:30:32 +0100 Subject: [PATCH] ARM: 7139/1: fix compilation with CONFIG_ARM_ATAG_DTB_COMPAT and large 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 Signed-off-by: Nicolas Pitre Signed-off-by: Russell King --- arch/arm/boot/compressed/head.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 9f5ac11ccd8e..c2effc917254 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -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 -- 2.39.5