aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cache.h4
-rw-r--r--include/linux/printk.h19
2 files changed, 12 insertions, 11 deletions
diff --git a/include/linux/cache.h b/include/linux/cache.h
index 4c570653ab84..17e7e82d2aa7 100644
--- a/include/linux/cache.h
+++ b/include/linux/cache.h
@@ -1,11 +1,11 @@
1#ifndef __LINUX_CACHE_H 1#ifndef __LINUX_CACHE_H
2#define __LINUX_CACHE_H 2#define __LINUX_CACHE_H
3 3
4#include <linux/kernel.h> 4#include <uapi/linux/kernel.h>
5#include <asm/cache.h> 5#include <asm/cache.h>
6 6
7#ifndef L1_CACHE_ALIGN 7#ifndef L1_CACHE_ALIGN
8#define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES) 8#define L1_CACHE_ALIGN(x) __ALIGN_KERNEL(x, L1_CACHE_BYTES)
9#endif 9#endif
10 10
11#ifndef SMP_CACHE_BYTES 11#ifndef SMP_CACHE_BYTES
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
9extern const char linux_banner[]; 10extern const char linux_banner[];
10extern const char linux_proc_banner[]; 11extern 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