X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fcompiler.h;h=c811c8b979ac29643669b7e3788b089df9fc5331;hb=1212663fba7c5e003e05d24f043d5ed57eb18b24;hp=8287a72bb6a913d01f7ca1def252880317dda297;hpb=7dfb1716d717e41c07410bab52760d865caee12b;p=linux-2.6 diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 8287a72bb6..c811c8b979 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -15,8 +15,8 @@ # define __acquire(x) __context__(x,1) # define __release(x) __context__(x,-1) # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) -extern void __chk_user_ptr(const void __user *); -extern void __chk_io_ptr(const void __iomem *); +extern void __chk_user_ptr(const volatile void __user *); +extern void __chk_io_ptr(const volatile void __iomem *); #else # define __user # define __kernel @@ -132,20 +132,6 @@ extern void __chk_io_ptr(const void __iomem *); # define __maybe_unused /* unimplemented */ #endif -/* - * From the GCC manual: - * - * Many functions have no effects except the return value and their - * return value depends only on the parameters and/or global - * variables. Such a function can be subject to common subexpression - * elimination and loop optimization just as an arithmetic operator - * would be. - * [...] - */ -#ifndef __attribute_pure__ -# define __attribute_pure__ /* unimplemented */ -#endif - #ifndef noinline #define noinline #endif @@ -174,4 +160,13 @@ extern void __chk_io_ptr(const void __iomem *); # define __attribute_const__ /* unimplemented */ #endif +/* + * Tell gcc if a function is cold. The compiler will assume any path + * directly leading to the call is unlikely. + */ + +#ifndef __cold +#define __cold +#endif + #endif /* __LINUX_COMPILER_H */