X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Flinux%2Fcompiler.h;h=86f9a3a6137debd41bdb03b8988580cbeb6d1ca7;hb=41d202d80e829c0a489119ad63d7ece08a9786da;hp=498c35920762e2e4a10ff61b1e01f9d27298e7dc;hpb=2c4f365ad2361c93c097e958b2b0a7a112750228;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 498c3592076..86f9a3a6137 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 @@ -36,9 +36,7 @@ extern void __chk_io_ptr(const void __iomem *); #ifdef __KERNEL__ -#if __GNUC__ > 4 -#error no compiler-gcc.h file for this gcc version -#elif __GNUC__ == 4 +#if __GNUC__ >= 4 # include #elif __GNUC__ == 3 && __GNUC_MINOR__ >= 2 # include @@ -176,4 +174,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 */