]> git.ipfire.org Git - thirdparty/kernel/linux.git/blame - kernel/bounds.c
signal: use fdget() since we don't allow O_PATH
[thirdparty/kernel/linux.git] / kernel / bounds.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
1cdf25d7
CL
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/* Include headers that define the enum constants of interest */
9223b419 10#include <linux/page-flags.h>
97965478 11#include <linux/mmzone.h>
37487a56 12#include <linux/kbuild.h>
90572890 13#include <linux/log2.h>
24b9fdc5 14#include <linux/spinlock_types.h>
1cdf25d7 15
6a32c246 16int main(void)
1cdf25d7 17{
01fc0ac1 18 /* The enum constants to put into include/generated/bounds.h */
9223b419 19 DEFINE(NR_PAGEFLAGS, __NR_PAGEFLAGS);
97965478 20 DEFINE(MAX_NR_ZONES, __MAX_NR_ZONES);
90572890
PZ
21#ifdef CONFIG_SMP
22 DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));
23#endif
597d795a 24 DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));
1cdf25d7 25 /* End of constants */
6a32c246
AB
26
27 return 0;
1cdf25d7 28}