Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Generate definitions needed by the preprocessor.
0004  * This code generates raw asm output which is post-processed
0005  * to extract and format the required data.
0006  */
0007 
0008 #define __GENERATING_BOUNDS_H
0009 /* Include headers that define the enum constants of interest */
0010 #include <linux/page-flags.h>
0011 #include <linux/mmzone.h>
0012 #include <linux/kbuild.h>
0013 #include <linux/log2.h>
0014 #include <linux/spinlock_types.h>
0015 
0016 int main(void)
0017 {
0018     /* The enum constants to put into include/generated/bounds.h */
0019     DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
0020     DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);
0021 #ifdef CONFIG_SMP
0022     DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));
0023 #endif
0024     DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));
0025     /* End of constants */
0026 
0027     return 0;
0028 }