]> git.baikalelectronics.ru Git - kernel.git/commit
[x86 setup] Volatilize asm() statements
authorH. Peter Anvin <hpa@zytor.com>
Wed, 22 Aug 2007 23:28:01 +0000 (16:28 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 23 Aug 2007 20:03:25 +0000 (13:03 -0700)
commitde5aa847ad89920f5ce6642fb036413fde5fd9eb
tree452f3fe6b9a7d2ef692e021a18f588490bc78441
parenta4e342ca636f1701092b821e222cac50b3f12a3b
[x86 setup] Volatilize asm() statements

asm() statements need to be volatile when:

a. They have side effects (other than value returned).
b. When the value returned can vary over time.
c. When they have ordering constraints that cannot be expressed to gcc.

In particular, the keyboard and timer reads were violating constraint (b),
which resulted in the keyboard/timeout poll getting
loop-invariant-removed when compiling with gcc 4.2.0.

Thanks to an anonymous bug reporter for pointing this out.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/i386/boot/boot.h
arch/i386/boot/cpucheck.c
arch/i386/boot/edd.c
arch/i386/boot/tty.c
arch/i386/boot/video-vga.c