ARM: 6623/1: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S
authorDave Martin <dave.martin@linaro.org>
Thu, 13 Jan 2011 23:43:01 +0000 (00:43 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 14 Jan 2011 09:00:30 +0000 (09:00 +0000)
Commit d30e45e (ARM: pgtable: switch order of Linux vs hardware page tables)
introduced a pre-increment addressing offset which is out of range for
Thumb-2.  Thumb-2 only permits offsets <256.  So split the intruction in
two for Thumb-2.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/proc-v7.S

index b49fab21517c04b1f0d7476571a05b7133ca4826..0c1172b56b4ed28b3a4970c6984c991252402d8f 100644 (file)
@@ -159,7 +159,9 @@ ENTRY(cpu_v7_set_pte_ext)
        tstne   r1, #L_PTE_PRESENT
        moveq   r3, #0
 
-       str     r3, [r0, #2048]!
+ ARM(  str     r3, [r0, #2048]! )
+ THUMB(        add     r0, r0, #2048 )
+ THUMB(        str     r3, [r0] )
        mcr     p15, 0, r0, c7, c10, 1          @ flush_pte
 #endif
        mov     pc, lr