Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / include / linux / numa.h
blobc8b9369335e0006fa4d598c860ff974877331e7e
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_NUMA_H
3 #define _LINUX_NUMA_H
6 #ifdef CONFIG_NODES_SHIFT
7 #define NODES_SHIFT CONFIG_NODES_SHIFT
8 #else
9 #define NODES_SHIFT 0
10 #endif
12 #define MAX_NUMNODES (1 << NODES_SHIFT)
14 #define NUMA_NO_NODE (-1)
16 static inline bool numa_valid_node(int nid)
18 return nid >= 0 && nid < MAX_NUMNODES;
21 #endif /* _LINUX_NUMA_H */