]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/compiler.h
sysfs: add copyrights
[linux-2.6-omap-h63xx.git] / include / linux / compiler.h
index 498c35920762e2e4a10ff61b1e01f9d27298e7dc..86f9a3a6137debd41bdb03b8988580cbeb6d1ca7 100644 (file)
@@ -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 <linux/compiler-gcc4.h>
 #elif __GNUC__ == 3 && __GNUC_MINOR__ >= 2
 # include <linux/compiler-gcc3.h>
@@ -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 */