| 1 | |
| 2 | |
| 3 | * Generate definitions needed by the preprocessor.
|
| 4 | * This code generates raw asm output which is post-processed
|
| 5 | * to extract and format the required data.
|
| 6 |
|
| 7 |
|
| 8 | #define __GENERATING_BOUNDS_H
|
| 9 | #define COMPILE_OFFSETS
|
| 10 |
|
| 11 | #include <linux/page-flags.h>
|
| 12 | #include <linux/mmzone.h>
|
| 13 | #include <linux/kbuild.h>
|
| 14 | #include <linux/log2.h>
|
| 15 | #include <linux/spinlock_types.h>
|
| 16 |
|
| 17 | int main(void)
|
| 18 | {
|
| 19 |
|
| 20 | DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
|
| 21 | DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);
|
| 22 | #ifdef CONFIG_SMP
|
| 23 | DEFINE(NR_CPUS_BITS, order_base_2(CONFIG_NR_CPUS));
|
| 24 | #endif
|
| 25 | DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));
|
| 26 | #ifdef CONFIG_LRU_GEN
|
| 27 | DEFINE(LRU_GEN_WIDTH, order_base_2(MAX_NR_GENS + 1));
|
| 28 | DEFINE(__LRU_REFS_WIDTH, MAX_NR_TIERS - 2);
|
| 29 | #else
|
| 30 | DEFINE(LRU_GEN_WIDTH, 0);
|
| 31 | DEFINE(__LRU_REFS_WIDTH, 0);
|
| 32 | #endif
|
| 33 |
|
| 34 |
|
| 35 | return 0;
|
| 36 | }
|