Re: [U-Boot] imx: get_ticks in syscounter.c get miscompiled by GCC 6

2018-03-09 Thread Yasushi SHOJI
Hi, On Wed, Mar 7, 2018 at 11:27 PM, Tom Rini wrote: > On Wed, Mar 07, 2018 at 10:42:44AM -0300, Fabio Estevam wrote: >> Patch looks good. Make sure to add your Signed-off-by line, then you >> can send it via git send-email. > > Yes please, thanks! I've sent it to you with my signed-of-by. than

Re: [U-Boot] imx: get_ticks in syscounter.c get miscompiled by GCC 6

2018-03-07 Thread Tom Rini
On Wed, Mar 07, 2018 at 10:42:44AM -0300, Fabio Estevam wrote: > Hi Yasushi , > > On Wed, Mar 7, 2018 at 2:57 AM, Yasushi SHOJI wrote: > > > Do you guys really want to put volatile on all of these now? > > We are at rc4 and Tom is planing to cut the release > > March 12th. > > This can be done

Re: [U-Boot] imx: get_ticks in syscounter.c get miscompiled by GCC 6

2018-03-07 Thread Fabio Estevam
Hi Yasushi , On Wed, Mar 7, 2018 at 2:57 AM, Yasushi SHOJI wrote: > Do you guys really want to put volatile on all of these now? > We are at rc4 and Tom is planing to cut the release > March 12th. This can be done at a later step. > I'm attaching a tentative patch to fix only syscounter.c. > I

Re: [U-Boot] imx: get_ticks in syscounter.c get miscompiled by GCC 6

2018-03-06 Thread Yasushi SHOJI
Hi, On Tue, Mar 6, 2018 at 10:11 PM, Fabio Estevam wrote: > On Tue, Mar 6, 2018 at 9:31 AM, Lothar Waßmann > wrote: > >> Without the 'volatile' attribute the compiler is entitled to move the >> asm code around or optimize it out. >> So, your patch is the correct fix independent from the gcc ver

Re: [U-Boot] imx: get_ticks in syscounter.c get miscompiled by GCC 6

2018-03-06 Thread Fabio Estevam
On Tue, Mar 6, 2018 at 9:31 AM, Lothar Waßmann wrote: > Without the 'volatile' attribute the compiler is entitled to move the > asm code around or optimize it out. > So, your patch is the correct fix independent from the gcc version > used. Yes, but then it would be better to fix all the places

Re: [U-Boot] imx: get_ticks in syscounter.c get miscompiled by GCC 6

2018-03-06 Thread Lothar Waßmann
Hi, On Tue, 6 Mar 2018 15:06:08 +0900 Yasushi SHOJI wrote: > Hi, > > It seems to me that both GCC 6.3 and 6.4 mis-compiles > s/mis-compiles/optimizes/ Without the 'volatile' attribute the compiler is entitled to move the asm code around or optimize it out. So, your patch is the correct fix indep

[U-Boot] imx: get_ticks in syscounter.c get miscompiled by GCC 6

2018-03-06 Thread Yasushi SHOJI
Hi, It seems to me that both GCC 6.3 and 6.4 mis-compiles arch/arm/mach-imx/syscounter.c. I'm attaching two files, bad.txt is the original syscounter.c and good.txt is the one with the following patch. diff --git a/arch/arm/mach-imx/syscounter.c b/arch/arm/mach-imx/syscounter.c index 9290918dca.