aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-02-04 10:48:00 -0500
committerIngo Molnar <mingo@elte.hu>2008-02-04 10:48:00 -0500
commit84fb144b928744cea8eb39bb4fbc794fcb749175 (patch)
tree6e037e1cda7bcfc0c20d5a827b1e4e7f587aec6b
parent2b06ac867176d5d24757bda7e13f6255d6b96d7b (diff)
x86: reintroduce volatile keyword in prototype to clflush()
The volatile keyword was removed from the clflush() prototype in commit e34907ae180f4fe6c28bb4516c679c2f81b0c9ed; 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>
-rw-r--r--include/asm-x86/system.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
index 428348e990bf..e9c15c97dfe2 100644
--- a/include/asm-x86/system.h
+++ b/include/asm-x86/system.h
@@ -271,9 +271,9 @@ static inline void native_wbinvd(void)
271 271
272#endif /* __KERNEL__ */ 272#endif /* __KERNEL__ */
273 273
274static inline void clflush(void *__p) 274static inline void clflush(volatile void *__p)
275{ 275{
276 asm volatile("clflush %0" : "+m" (*(char __force *)__p)); 276 asm volatile("clflush %0" : "+m" (*(volatile char __force *)__p));
277} 277}
278 278
279#define nop() __asm__ __volatile__ ("nop") 279#define nop() __asm__ __volatile__ ("nop")