Re: [PATCH 1/3] hvc_dcc: Fix bad code generation by marking assembly volatile

2011-01-04 Thread Tony Lindgren
* Nicolas Pitre n...@fluxnic.net [101220 13:38]: On Mon, 20 Dec 2010, Stephen Boyd wrote: Without marking the asm __dcc_getstatus() volatile my compiler decides it can cache the value of __ret in a register and then check the value of it continually in hvc_dcc_put_chars() (I had to

Re: [PATCH 1/3] hvc_dcc: Fix bad code generation by marking assembly volatile

2011-01-02 Thread Pavel Machek
Hi! diff --git a/drivers/char/hvc_dcc.c b/drivers/char/hvc_dcc.c index 6470f63..155ec10 100644 --- a/drivers/char/hvc_dcc.c +++ b/drivers/char/hvc_dcc.c @@ -33,8 +33,7 @@ static inline u32 __dcc_getstatus(void) { u32 __ret; - - asm(mrc p14, 0, %0, c0, c1, 0 @ read

Re: [PATCH 1/3] hvc_dcc: Fix bad code generation by marking assembly volatile

2011-01-02 Thread David Brown
On Sun, Jan 02 2011, Pavel Machek wrote: diff --git a/drivers/char/hvc_dcc.c b/drivers/char/hvc_dcc.c index 6470f63..155ec10 100644 --- a/drivers/char/hvc_dcc.c +++ b/drivers/char/hvc_dcc.c @@ -33,8 +33,7 @@ static inline u32 __dcc_getstatus(void) { u32 __ret; - -

[PATCH 1/3] hvc_dcc: Fix bad code generation by marking assembly volatile

2010-12-20 Thread Stephen Boyd
Without marking the asm __dcc_getstatus() volatile my compiler decides it can cache the value of __ret in a register and then check the value of it continually in hvc_dcc_put_chars() (I had to replace get_wait/put_wait with 1 and fixup the branch otherwise my disassembler barfed on

Re: [PATCH 1/3] hvc_dcc: Fix bad code generation by marking assembly volatile

2010-12-20 Thread Nicolas Pitre
On Mon, 20 Dec 2010, Stephen Boyd wrote: Without marking the asm __dcc_getstatus() volatile my compiler decides it can cache the value of __ret in a register and then check the value of it continually in hvc_dcc_put_chars() (I had to replace get_wait/put_wait with 1 and fixup the branch

Re: [PATCH 1/3] hvc_dcc: Fix bad code generation by marking assembly volatile

2010-12-20 Thread Arnaud Lacombe
Hi, On Mon, Dec 20, 2010 at 3:08 PM, Stephen Boyd sb...@codeaurora.org wrote: Without marking the asm __dcc_getstatus() volatile my compiler decides [...] What compiler ? That might be a usefull information to know, espectially 5 years from now when tracing code history. There has been similar

Re: [PATCH 1/3] hvc_dcc: Fix bad code generation by marking assembly volatile

2010-12-20 Thread Stephen Boyd
On 12/20/2010 01:49 PM, Arnaud Lacombe wrote: Hi, On Mon, Dec 20, 2010 at 3:08 PM, Stephen Boyd sb...@codeaurora.org wrote: Without marking the asm __dcc_getstatus() volatile my compiler decides [...] What compiler ? That might be a usefull information to know, espectially 5 years from now

Re: [PATCH 1/3] hvc_dcc: Fix bad code generation by marking assembly volatile

2010-12-20 Thread Nicolas Pitre
On Mon, 20 Dec 2010, Stephen Boyd wrote: On 12/20/2010 01:49 PM, Arnaud Lacombe wrote: Hi, On Mon, Dec 20, 2010 at 3:08 PM, Stephen Boyd sb...@codeaurora.org wrote: Without marking the asm __dcc_getstatus() volatile my compiler decides [...] What compiler ? That might be a usefull