@@ -94,6 +94,7 @@ SECTIONS
__end_schedulers_array = .;
*(.data.rel)
*(.data.rel.*)
+ *(.data.cold)
CONSTRUCTORS
} :text
@@ -270,6 +270,7 @@ SECTIONS
*(.data)
*(.data.rel)
*(.data.rel.*)
+ *(.data.cold)
CONSTRUCTORS
} :text
@@ -11,6 +11,19 @@
#define BUG_ON(p) do { if (unlikely(p)) BUG(); } while (0)
#define WARN_ON(p) do { if (unlikely(p)) WARN(); } while (0)
+#define WARN_ON_ONCE(p) \
+({ \
+ static bool __section(".data.cold") warned; \
+ bool ret_warn_once = !!(p); \
+ \
+ if ( unlikely(ret_warn_once && !warned) ) \
+ { \
+ warned = true; \
+ WARN(); \
+ } \
+ unlikely(ret_warn_once); \
+})
+
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
/* Force a compilation error if condition is true */
#define BUILD_BUG_ON(cond) ({ _Static_assert(!(cond), "!(" #cond ")"); })