aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 645231c373c8..ec55a3c8ba77 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -38,6 +38,8 @@
38 38
39#define STACK_MAGIC 0xdeadbeef 39#define STACK_MAGIC 0xdeadbeef
40 40
41#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
42
41#define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) 43#define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
42#define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask)) 44#define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask))
43#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) 45#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
@@ -480,15 +482,16 @@ do { \
480 482
481#define trace_printk(fmt, args...) \ 483#define trace_printk(fmt, args...) \
482do { \ 484do { \
485 static const char *trace_printk_fmt \
486 __attribute__((section("__trace_printk_fmt"))) = \
487 __builtin_constant_p(fmt) ? fmt : NULL; \
488 \
483 __trace_printk_check_format(fmt, ##args); \ 489 __trace_printk_check_format(fmt, ##args); \
484 if (__builtin_constant_p(fmt)) { \
485 static const char *trace_printk_fmt \
486 __attribute__((section("__trace_printk_fmt"))) = \
487 __builtin_constant_p(fmt) ? fmt : NULL; \
488 \ 490 \
491 if (__builtin_constant_p(fmt)) \
489 __trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args); \ 492 __trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args); \
490 } else \ 493 else \
491 __trace_printk(_THIS_IP_, fmt, ##args); \ 494 __trace_printk(_THIS_IP_, fmt, ##args); \
492} while (0) 495} while (0)
493 496
494extern __printf(2, 3) 497extern __printf(2, 3)