
Hi,
On Tue, Mar 6, 2018 at 10:11 PM, Fabio Estevam festevam@gmail.com wrote:
On Tue, Mar 6, 2018 at 9:31 AM, Lothar Waßmann LW@karo-electronics.de 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 where asm is used without volatile.
That'd be a quite big patch. A quick grep shows me that there is over 100 asm() without volatile.
git grep -e '\basm *(' | grep -v -e volatile -e nop | wc -l 153
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.
I'm attaching a tentative patch to fix only syscounter.c. If it looks good, I'l resend it by git-send-email.
Best,