aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/kbuild.h15
-rw-r--r--kernel/bounds.c6
2 files changed, 16 insertions, 5 deletions
diff --git a/include/linux/kbuild.h b/include/linux/kbuild.h
new file mode 100644
index 000000000000..22a72198c14b
--- /dev/null
+++ b/include/linux/kbuild.h
@@ -0,0 +1,15 @@
1#ifndef __LINUX_KBUILD_H
2#define __LINUX_KBUILD_H
3
4#define DEFINE(sym, val) \
5 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
6
7#define BLANK() asm volatile("\n->" : : )
8
9#define OFFSET(sym, str, mem) \
10 DEFINE(sym, offsetof(struct str, mem))
11
12#define COMMENT(x) \
13 asm volatile("\n->#" x)
14
15#endif
diff --git a/kernel/bounds.c b/kernel/bounds.c
index c3c55544db2f..3c5301381837 100644
--- a/kernel/bounds.c
+++ b/kernel/bounds.c
@@ -8,11 +8,7 @@
8/* Include headers that define the enum constants of interest */ 8/* Include headers that define the enum constants of interest */
9#include <linux/page-flags.h> 9#include <linux/page-flags.h>
10#include <linux/mmzone.h> 10#include <linux/mmzone.h>
11 11#include <linux/kbuild.h>
12#define DEFINE(sym, val) \
13 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
14
15#define BLANK() asm volatile("\n->" : : )
16 12
17void foo(void) 13void foo(void)
18{ 14{