sched/headers, mm: Move 'struct tlbflush_unmap_batch' from <linux/sched.h> to <linux...
authorIngo Molnar <mingo@kernel.org>
Sun, 5 Feb 2017 14:05:49 +0000 (15:05 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 3 Mar 2017 00:45:25 +0000 (01:45 +0100)
Unclutter <linux/sched.h> some more.

Also move the CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH condition inside the
structure body definition, to remove a pair of #ifdefs from sched.h.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/mm_types_task.h
include/linux/sched.h

index 9526d8b..136dfdf 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/types.h>
 #include <linux/threads.h>
 #include <linux/atomic.h>
+#include <linux/cpumask.h>
 
 #include <asm/page.h>
 
@@ -62,4 +63,25 @@ struct page_frag {
 #endif
 };
 
+/* Track pages that require TLB flushes */
+struct tlbflush_unmap_batch {
+#ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
+       /*
+        * Each bit set is a CPU that potentially has a TLB entry for one of
+        * the PFNs being flushed. See set_tlb_ubc_flush_pending().
+        */
+       struct cpumask cpumask;
+
+       /* True if any bit in cpumask is set */
+       bool flush_required;
+
+       /*
+        * If true then the PTE was dirty when unmapped. The entry must be
+        * flushed before IO is initiated or a stale TLB entry potentially
+        * allows an update without redirtying the page.
+        */
+       bool writable;
+#endif
+};
+
 #endif /* _LINUX_MM_TYPES_TASK_H */
index dc8d94d..8d6b7aa 100644 (file)
@@ -484,25 +484,6 @@ struct wake_q_node {
        struct wake_q_node *next;
 };
 
-/* Track pages that require TLB flushes */
-struct tlbflush_unmap_batch {
-       /*
-        * Each bit set is a CPU that potentially has a TLB entry for one of
-        * the PFNs being flushed. See set_tlb_ubc_flush_pending().
-        */
-       struct cpumask cpumask;
-
-       /* True if any bit in cpumask is set */
-       bool flush_required;
-
-       /*
-        * If true then the PTE was dirty when unmapped. The entry must be
-        * flushed before IO is initiated or a stale TLB entry potentially
-        * allows an update without redirtying the page.
-        */
-       bool writable;
-};
-
 struct task_struct {
 #ifdef CONFIG_THREAD_INFO_IN_TASK
        /*
@@ -895,9 +876,7 @@ struct task_struct {
        unsigned long numa_pages_migrated;
 #endif /* CONFIG_NUMA_BALANCING */
 
-#ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
        struct tlbflush_unmap_batch tlb_ubc;
-#endif
 
        struct rcu_head rcu;