]> git.baikalelectronics.ru Git - kernel.git/commit
x86: reintroduce volatile keyword in prototype to clflush()
authorH. Peter Anvin <hpa@zytor.com>
Mon, 4 Feb 2008 15:48:00 +0000 (16:48 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 4 Feb 2008 15:48:00 +0000 (16:48 +0100)
commitf77342c0a3ecc9ea11bb72f19ad6a1ce67891776
tree6e037e1cda7bcfc0c20d5a827b1e4e7f587aec6b
parentacc206639238336c559af40a9b8253146717541d
x86: reintroduce volatile keyword in prototype to clflush()

The volatile keyword was removed from the clflush() prototype
in commit 97ee155b4309a5137f4aa010cac0ebff1b088af8; the comment there
states:

    x86: remove volatile keyword from clflush.

    the p parameter is an explicit memory reference, and is
    enough to prevent gcc to being nasty here. The volatile
    seems completely not needed.

This reflects incorrect understanding of the function of the volatile
keyword there.  The purpose of the volatile keyword is informing gcc
that it is safe to pass a volatile pointer to this function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/asm-x86/system.h