linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S
@ 2011-01-12  0:03 Dave Martin
  2011-01-12  8:14 ` Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Martin @ 2011-01-12  0:03 UTC (permalink / raw)
  To: linux-arm-kernel

The following patch introduces a pre-increment addressing
offset which is out of range for Thumb-2:
    ARM: pgtable: switch order of Linux vs hardware page tables

162:	str	r3, [r0, #2048]!

Thumb-2 only permits offsets <256 for pre-increment addressing.

This patch replaces the store instruction with a suitable add-str
pair for the Thumb-2 case.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
---
KernelVersion: v2.6.37

 arch/arm/mm/proc-v7.S |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index b49fab2..0c1172b 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -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
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S
  2011-01-12  0:03 [PATCH] ARM: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S Dave Martin
@ 2011-01-12  8:14 ` Uwe Kleine-König
  2011-01-12 16:33   ` Dave Martin
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2011-01-12  8:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 11, 2011 at 06:03:33PM -0600, Dave Martin wrote:
> The following patch introduces a pre-increment addressing
> offset which is out of range for Thumb-2:
>     ARM: pgtable: switch order of Linux vs hardware page tables
a commit id would be nice here

Uwe
> 
> 162:	str	r3, [r0, #2048]!
> 
> Thumb-2 only permits offsets <256 for pre-increment addressing.
> 
> This patch replaces the store instruction with a suitable add-str
> pair for the Thumb-2 case.
> 
> Signed-off-by: Dave Martin <dave.martin@linaro.org>
> ---
> KernelVersion: v2.6.37
> 
>  arch/arm/mm/proc-v7.S |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
> index b49fab2..0c1172b 100644
> --- a/arch/arm/mm/proc-v7.S
> +++ b/arch/arm/mm/proc-v7.S
> @@ -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
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S
  2011-01-12  8:14 ` Uwe Kleine-König
@ 2011-01-12 16:33   ` Dave Martin
  2011-01-12 18:18     ` Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Martin @ 2011-01-12 16:33 UTC (permalink / raw)
  To: linux-arm-kernel

2011/1/12 Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>:
> On Tue, Jan 11, 2011 at 06:03:33PM -0600, Dave Martin wrote:
>> The following patch introduces a pre-increment addressing
>> offset which is out of range for Thumb-2:
>> ? ? ARM: pgtable: switch order of Linux vs hardware page tables
> a commit id would be nice here
>
> Uwe

Apologies--- it's commit d30e45eeabefadc6039d7f876a59e5f5f6cb11c6

Cheers
---Dave

>>
>> 162: ?str ? ? r3, [r0, #2048]!
>>
>> Thumb-2 only permits offsets <256 for pre-increment addressing.
>>
>> This patch replaces the store instruction with a suitable add-str
>> pair for the Thumb-2 case.
>>
>> Signed-off-by: Dave Martin <dave.martin@linaro.org>
>> ---
>> KernelVersion: v2.6.37
>>
>> ?arch/arm/mm/proc-v7.S | ? ?4 +++-
>> ?1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
>> index b49fab2..0c1172b 100644
>> --- a/arch/arm/mm/proc-v7.S
>> +++ b/arch/arm/mm/proc-v7.S
>> @@ -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
>> --
>> 1.7.1
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>
> --
> Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?|
> Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S
  2011-01-12 16:33   ` Dave Martin
@ 2011-01-12 18:18     ` Uwe Kleine-König
  0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2011-01-12 18:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 12, 2011 at 10:33:33AM -0600, Dave Martin wrote:
> 2011/1/12 Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>:
> > On Tue, Jan 11, 2011 at 06:03:33PM -0600, Dave Martin wrote:
> >> The following patch introduces a pre-increment addressing
> >> offset which is out of range for Thumb-2:
> >> ? ? ARM: pgtable: switch order of Linux vs hardware page tables
> > a commit id would be nice here
> >
> > Uwe
> 
> Apologies--- it's commit d30e45eeabefadc6039d7f876a59e5f5f6cb11c6
No need to excuse.

I suggest:

ARM: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S

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: ...

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-12 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12  0:03 [PATCH] ARM: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S Dave Martin
2011-01-12  8:14 ` Uwe Kleine-König
2011-01-12 16:33   ` Dave Martin
2011-01-12 18:18     ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).