aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Lameter <[email protected]>2008-04-29 01:03:49 -0700
committerLinus Torvalds <[email protected]>2008-04-29 08:06:29 -0700
commit37487a56523d402e25650da16c337acf4cecd13d (patch)
tree7b33ea929f98e25421f48d553bca986d983745c7 /include/linux
parent39fa00311f21318cc498b139c2cc2830dcad98ff (diff)
Add kbuild.h that contains common definitions for kbuild users
The same definitions are used for the bounds logic and the asm-offsets.h generation by kbuild. Put them into include/linux/kbuild.h file. Also add a new feature COMMENT("text") which can be used to insert lines of ocmments into asm-offsets.h and bounds.h. Cc: Sam Ravnborg <[email protected]> Signed-off-by: Christoph Lameter <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Jay Estabrook <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Richard Henderson <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: Russell King <[email protected]> Cc: Chris Zankel <[email protected]> Cc: David S. Miller <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Cc: Bryan Wu <[email protected]> Cc: Mike Frysinger <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Roman Zippel <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: David Howells <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Grant Grundler <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Miles Bader <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/kbuild.h15
1 files changed, 15 insertions, 0 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 @@
+#ifndef __LINUX_KBUILD_H
+#define __LINUX_KBUILD_H
+
+#define DEFINE(sym, val) \
+ asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+
+#define BLANK() asm volatile("\n->" : : )
+
+#define OFFSET(sym, str, mem) \
+ DEFINE(sym, offsetof(struct str, mem))
+
+#define COMMENT(x) \
+ asm volatile("\n->#" x)
+
+#endif