diff options
Diffstat (limited to 'include/linux/printk.h')
-rw-r--r-- | include/linux/printk.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h index 694925837a16..cc6f74d65167 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/kern_levels.h> | 6 | #include <linux/kern_levels.h> |
7 | #include <linux/linkage.h> | 7 | #include <linux/linkage.h> |
8 | #include <linux/cache.h> | ||
8 | 9 | ||
9 | extern const char linux_banner[]; | 10 | extern const char linux_banner[]; |
10 | extern const char linux_proc_banner[]; | 11 | extern const char linux_proc_banner[]; |
@@ -253,17 +254,17 @@ extern asmlinkage void dump_stack(void) __cold; | |||
253 | */ | 254 | */ |
254 | 255 | ||
255 | #ifdef CONFIG_PRINTK | 256 | #ifdef CONFIG_PRINTK |
256 | #define printk_once(fmt, ...) \ | 257 | #define printk_once(fmt, ...) \ |
257 | ({ \ | 258 | ({ \ |
258 | static bool __print_once; \ | 259 | static bool __print_once __read_mostly; \ |
259 | \ | 260 | \ |
260 | if (!__print_once) { \ | 261 | if (!__print_once) { \ |
261 | __print_once = true; \ | 262 | __print_once = true; \ |
262 | printk(fmt, ##__VA_ARGS__); \ | 263 | printk(fmt, ##__VA_ARGS__); \ |
263 | } \ | 264 | } \ |
264 | }) | 265 | }) |
265 | #else | 266 | #else |
266 | #define printk_once(fmt, ...) \ | 267 | #define printk_once(fmt, ...) \ |
267 | no_printk(fmt, ##__VA_ARGS__) | 268 | no_printk(fmt, ##__VA_ARGS__) |
268 | #endif | 269 | #endif |
269 | 270 | ||