Re: [PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-03-01 Thread Will Deacon
Hi David, On Sun, 2011-02-27 at 17:38 +, David Brown wrote: > Per the gcc manual: > > If your assembler instructions access memory in an unpredictable >fashion, add `memory' to the list of clobbered registers. This will >cause GCC to not keep memory values cached in registers acr

Re: [PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-02-27 Thread Nicolas Pitre
On Sun, 27 Feb 2011, David Brown wrote: > On Sat, Feb 26 2011, Nicolas Pitre wrote: > > > On Sat, 26 Feb 2011, David Brown wrote: > > > >> On Fri, Feb 25 2011, Will Deacon wrote: > >> > >> > On Thu, 2011-02-24 at 18:44 +, Stephen Boyd wrote: > >> >> We don't want the compiler to remove these

Re: [PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-02-27 Thread David Brown
On Sat, Feb 26 2011, Nicolas Pitre wrote: > On Sat, 26 Feb 2011, David Brown wrote: > >> On Fri, Feb 25 2011, Will Deacon wrote: >> >> > On Thu, 2011-02-24 at 18:44 +, Stephen Boyd wrote: >> >> We don't want the compiler to remove these asm statements or >> >> reorder them in any way. Mark th

Re: [PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-02-27 Thread David Brown
On Sun, Feb 27 2011, Will Deacon wrote: > On Sat, 2011-02-26 at 18:12 +, David Brown wrote: >> On Fri, Feb 25 2011, Will Deacon wrote: > >> > These asm blocks all have sensible looking output constraints. Why >> > do they need to be marked volatile? >> >> Without the volatile, the compiler is

Re: [PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-02-27 Thread Will Deacon
On Sat, 2011-02-26 at 18:12 +, David Brown wrote: > On Fri, Feb 25 2011, Will Deacon wrote: > > These asm blocks all have sensible looking output constraints. Why > > do they need to be marked volatile? > > Without the volatile, the compiler is free to assume the only side > effects of the as

Re: [PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-02-26 Thread Nicolas Pitre
On Sat, 26 Feb 2011, David Brown wrote: > On Fri, Feb 25 2011, Will Deacon wrote: > > > On Thu, 2011-02-24 at 18:44 +, Stephen Boyd wrote: > >> We don't want the compiler to remove these asm statements or > >> reorder them in any way. Mark them as volatile to be sure. > >> > >> Signed-off-by

Re: [PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-02-26 Thread David Brown
On Fri, Feb 25 2011, Will Deacon wrote: > On Thu, 2011-02-24 at 18:44 +, Stephen Boyd wrote: >> We don't want the compiler to remove these asm statements or >> reorder them in any way. Mark them as volatile to be sure. >> >> Signed-off-by: Stephen Boyd >> --- >> arch/arm/mach-msm/scm.c |

Re: [PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-02-25 Thread Stephen Boyd
On 02/25/2011 03:56 AM, Will Deacon wrote: > Hi Stephen, > > On Thu, 2011-02-24 at 18:44 +, Stephen Boyd wrote: >> We don't want the compiler to remove these asm statements or >> reorder them in any way. Mark them as volatile to be sure. >> >> Signed-off-by: Stephen Boyd >> --- >> arch/arm/ma

Re: [PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-02-25 Thread Will Deacon
Hi Stephen, On Thu, 2011-02-24 at 18:44 +, Stephen Boyd wrote: > We don't want the compiler to remove these asm statements or > reorder them in any way. Mark them as volatile to be sure. > > Signed-off-by: Stephen Boyd > --- > arch/arm/mach-msm/scm.c |4 ++-- > 1 files changed, 2 insert

[PATCH 1/4] msm: scm: Mark inline asm as volatile

2011-02-24 Thread Stephen Boyd
We don't want the compiler to remove these asm statements or reorder them in any way. Mark them as volatile to be sure. Signed-off-by: Stephen Boyd --- arch/arm/mach-msm/scm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-msm/