summaryrefslogtreecommitdiffstats
path: root/kernel/bounds.c
blob: 9ca2bb30243ccd1580d487d9daaaf148f86c579b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * 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>

#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);
	/* End of constants */
}
OpenPOWER on IntegriCloud