[PATCH 1/5] ARM: pgtable: switch order of Linux vs hardware page tables

Catalin Marinas catalin.marinas at arm.com
Fri Nov 19 06:48:31 EST 2010


On 17 November 2010 17:28, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> --- a/arch/arm/mm/proc-v7.S
> +++ b/arch/arm/mm/proc-v7.S
> @@ -158,7 +156,7 @@ ENTRY(cpu_v7_set_pte_ext)
>        tstne   r1, #L_PTE_PRESENT
>        moveq   r3, #0
>
> -       str     r3, [r0]
> +       str     r3, [r0, #2048]!

Thumb-2 build gives "offset out of range".  We need to do a separate
ADD for this case.

diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 688deda..9aba33c 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -186,7 +186,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(	str	r3, [r0, #2048]		)
+ THUMB(	add	r0, r0, #2048		)
 #endif	/* CONFIG_ARM_LPAE */
 	mcr	p15, 0, r0, c7, c10, 1		@ flush_pte
 #endif


-- 
Catalin



More information about the linux-arm-kernel mailing list