@@ -2,7 +2,7 @@
#ifndef _ARCH_X86_TLBBATCH_H
#define _ARCH_X86_TLBBATCH_H
-#include <linux/cpumask.h>
+#include <linux/cpumask_types.h>
struct arch_tlbflush_unmap_batch {
/*
@@ -14,9 +14,7 @@
#include <linux/bug.h>
#include <linux/gfp_types.h>
#include <linux/numa.h>
-
-/* Don't assign or return these: may not be this big! */
-typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
+#include <linux/cpumask_types.h>
/**
* cpumask_bits - get the bits in a cpumask
new file mode 100644
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __LINUX_CPUMASK_TYPES_H
+#define __LINUX_CPUMASK_TYPES_H
+
+#include <linux/bitops.h>
+#include <linux/types.h>
+#include <linux/threads.h>
+
+/* Don't assign or return these: may not be this big! */
+typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
+
+#endif /* __LINUX_CPUMASK_TYPES_H */
More sched.h dependency trimming: this will help to kill the printk.h dependency. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> --- arch/x86/include/asm/tlbbatch.h | 2 +- include/linux/cpumask.h | 4 +--- include/linux/cpumask_types.h | 12 ++++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 include/linux/cpumask_types.h