aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bounds.c
diff options
context:
space:
mode:
authorIgor Mammedov <niallain@gmail.com>2008-04-28 23:08:21 +0000
committerSteve French <sfrench@us.ibm.com>2008-04-28 23:08:21 +0000
commite9f20d6f03e8df393b001dab6dc5226c2a5daf57 (patch)
tree73e94fa5e4f83576c97e36187b809c5aad2ade30 /kernel/bounds.c
parentbf62fd887cab230f5952b611bde25e8e15acb454 (diff)
parente31a94ed371c70855eb30b77c490d6d85dd4da26 (diff)
downloadkernel_samsung_smdk4412-e9f20d6f03e8df393b001dab6dc5226c2a5daf57.zip
kernel_samsung_smdk4412-e9f20d6f03e8df393b001dab6dc5226c2a5daf57.tar.gz
kernel_samsung_smdk4412-e9f20d6f03e8df393b001dab6dc5226c2a5daf57.tar.bz2
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'kernel/bounds.c')
-rw-r--r--kernel/bounds.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/bounds.c b/kernel/bounds.c
new file mode 100644
index 0000000..c3c5554
--- /dev/null
+++ b/kernel/bounds.c
@@ -0,0 +1,23 @@
+/*
+ * Generate definitions needed by the preprocessor.
+ * This code generates raw asm output which is post-processed
+ * to extract and format the required data.
+ */
+
+#define __GENERATING_BOUNDS_H
+/* Include headers that define the enum constants of interest */
+#include <linux/page-flags.h>
+#include <linux/mmzone.h>
+
+#define DEFINE(sym, val) \
+ asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+
+#define BLANK() asm volatile("\n->" : : )
+
+void foo(void)
+{
+ /* The enum constants to put into include/linux/bounds.h */
+ DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
+ DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);
+ /* End of constants */
+}