Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1286377 > unrolled thread

Re: [PATCH V2] ARM: SWP emulation: Restore original *data when failed

Started byVladimir Murzin <vladimir.murzin@arm.com>
First post2015-12-08 11:30 +0100
Last post2015-12-08 13:50 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH V2] ARM: SWP emulation: Restore original *data when failed Vladimir Murzin <vladimir.murzin@arm.com> - 2015-12-08 11:30 +0100
    Re: [PATCH V2] ARM: SWP emulation: Restore original *data when failed Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-12-08 11:50 +0100
      Re: [PATCH V2] ARM: SWP emulation: Restore original *data when failed Vladimir Murzin <vladimir.murzin@arm.com> - 2015-12-08 13:50 +0100

#1286377 — Re: [PATCH V2] ARM: SWP emulation: Restore original *data when failed

FromVladimir Murzin <vladimir.murzin@arm.com>
Date2015-12-08 11:30 +0100
SubjectRe: [PATCH V2] ARM: SWP emulation: Restore original *data when failed
Message-ID<qDnGW-18s-3@gated-at.bofh.it>
On 15/10/15 10:30, Shengjiu Wang wrote:
> __user_swpX_asm maybe failed in first STREX operation, emulate_swpX
> will try again, but the *data has been changed in first time. which
> causes the result is wrong.
> This patch is to fix this issue. When STREX succeed, change the *data.
> if it fail, *data is not changed.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
> ---
>  arch/arm/kernel/swp_emulate.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c
> index 5b26e7e..c3fe769d 100644
> --- a/arch/arm/kernel/swp_emulate.c
> +++ b/arch/arm/kernel/swp_emulate.c
> @@ -36,10 +36,10 @@
>   */
>  #define __user_swpX_asm(data, addr, res, temp, B)		\
>  	__asm__ __volatile__(					\
> -	"	mov		%2, %1\n"			\
> -	"0:	ldrex"B"	%1, [%3]\n"			\
> -	"1:	strex"B"	%0, %2, [%3]\n"			\
> +	"0:	ldrex"B"	%2, [%3]\n"			\
> +	"1:	strex"B"	%0, %1, [%3]\n"			\
>  	"	cmp		%0, #0\n"			\
> +	"	moveq		%1, %2\n"			\
>  	"	movne		%0, %4\n"			\
>  	"2:\n"							\
>  	"	.section	 .text.fixup,\"ax\"\n"		\
> 

I wonder what is status of this patch? I see that arm64 counterpart has
landed in mainline, but I didn't manage to track down this one - is it
because it never been submitted to patch system?

Thanks
Vladimir

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1286384

FromRussell King - ARM Linux <linux@arm.linux.org.uk>
Date2015-12-08 11:50 +0100
Message-ID<qDo0i-1f5-1@gated-at.bofh.it>
In reply to#1286377
On Tue, Dec 08, 2015 at 10:22:53AM +0000, Vladimir Murzin wrote:
> On 15/10/15 10:30, Shengjiu Wang wrote:
> > __user_swpX_asm maybe failed in first STREX operation, emulate_swpX
> > will try again, but the *data has been changed in first time. which
> > causes the result is wrong.
> > This patch is to fix this issue. When STREX succeed, change the *data.
> > if it fail, *data is not changed.
> > 
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
> > ---
> >  arch/arm/kernel/swp_emulate.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c
> > index 5b26e7e..c3fe769d 100644
> > --- a/arch/arm/kernel/swp_emulate.c
> > +++ b/arch/arm/kernel/swp_emulate.c
> > @@ -36,10 +36,10 @@
> >   */
> >  #define __user_swpX_asm(data, addr, res, temp, B)		\
> >  	__asm__ __volatile__(					\
> > -	"	mov		%2, %1\n"			\
> > -	"0:	ldrex"B"	%1, [%3]\n"			\
> > -	"1:	strex"B"	%0, %2, [%3]\n"			\
> > +	"0:	ldrex"B"	%2, [%3]\n"			\
> > +	"1:	strex"B"	%0, %1, [%3]\n"			\
> >  	"	cmp		%0, #0\n"			\
> > +	"	moveq		%1, %2\n"			\
> >  	"	movne		%0, %4\n"			\
> >  	"2:\n"							\
> >  	"	.section	 .text.fixup,\"ax\"\n"		\
> > 
> 
> I wonder what is status of this patch? I see that arm64 counterpart has
> landed in mainline, but I didn't manage to track down this one - is it
> because it never been submitted to patch system?

Most probably.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1286433

FromVladimir Murzin <vladimir.murzin@arm.com>
Date2015-12-08 13:50 +0100
Message-ID<qDpSq-2rq-17@gated-at.bofh.it>
In reply to#1286384
On 08/12/15 10:44, Russell King - ARM Linux wrote:
> On Tue, Dec 08, 2015 at 10:22:53AM +0000, Vladimir Murzin wrote:
>> On 15/10/15 10:30, Shengjiu Wang wrote:
>>> __user_swpX_asm maybe failed in first STREX operation, emulate_swpX
>>> will try again, but the *data has been changed in first time. which
>>> causes the result is wrong.
>>> This patch is to fix this issue. When STREX succeed, change the *data.
>>> if it fail, *data is not changed.
>>>
>>> Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
>>> ---
>>>  arch/arm/kernel/swp_emulate.c | 6 +++---
>>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c
>>> index 5b26e7e..c3fe769d 100644
>>> --- a/arch/arm/kernel/swp_emulate.c
>>> +++ b/arch/arm/kernel/swp_emulate.c
>>> @@ -36,10 +36,10 @@
>>>   */
>>>  #define __user_swpX_asm(data, addr, res, temp, B)		\
>>>  	__asm__ __volatile__(					\
>>> -	"	mov		%2, %1\n"			\
>>> -	"0:	ldrex"B"	%1, [%3]\n"			\
>>> -	"1:	strex"B"	%0, %2, [%3]\n"			\
>>> +	"0:	ldrex"B"	%2, [%3]\n"			\
>>> +	"1:	strex"B"	%0, %1, [%3]\n"			\
>>>  	"	cmp		%0, #0\n"			\
>>> +	"	moveq		%1, %2\n"			\
>>>  	"	movne		%0, %4\n"			\
>>>  	"2:\n"							\
>>>  	"	.section	 .text.fixup,\"ax\"\n"		\
>>>
>>
>> I wonder what is status of this patch? I see that arm64 counterpart has
>> landed in mainline, but I didn't manage to track down this one - is it
>> because it never been submitted to patch system?
> 
> Most probably.
> 

I've just submitted (on behalf of Shengjiu) it as 8475/1 with assumption
you have no concerns about the patch.

Thanks
Vladimir

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web