pandora: defconfig: update
[pandora-kernel.git] / include / linux / compiler-gcc.h
index cb4c1eb..9ac1a7a 100644 (file)
@@ -5,6 +5,9 @@
 /*
  * Common definitions for all gcc versions go here.
  */
+#define GCC_VERSION (__GNUC__ * 10000 \
+                  + __GNUC_MINOR__ * 100 \
+                  + __GNUC_PATCHLEVEL__)
 
 
 /* Optimization barrier */
     __asm__ ("" : "=r"(__ptr) : "0"(ptr));             \
     (typeof(ptr)) (__ptr + (off)); })
 
+/* Make the optimizer believe the variable can be manipulated arbitrarily. */
+#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var))
+
+#ifdef __CHECKER__
+#define __must_be_array(arr) 0
+#else
 /* &a[0] degrades to a pointer: a different type from an array */
 #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
+#endif
 
 /*
  * Force always-inline if the user requests it so via the .config,
 # define inline                inline          __attribute__((always_inline))
 # define __inline__    __inline__      __attribute__((always_inline))
 # define __inline      __inline        __attribute__((always_inline))
+#else
+/* A lot of inline functions can cause havoc with function tracing */
+# define inline                inline          notrace
+# define __inline__    __inline__      notrace
+# define __inline      __inline        notrace
 #endif
 
 #define __deprecated                   __attribute__((deprecated))