The patch titled Subject: include/: refactor headers to allow kthread.h inclusion in psi_types.h has been added to the -mm tree. Its filename is refactor-header-includes-to-allow-kthreadh-inclusion-in-psi_typesh.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/refactor-header-includes-to-allow-kthreadh-inclusion-in-psi_typesh.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/refactor-header-includes-to-allow-kthreadh-inclusion-in-psi_typesh.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Suren Baghdasaryan <surenb@xxxxxxxxxx> Subject: include/: refactor headers to allow kthread.h inclusion in psi_types.h kthread.h can't be included in psi_types.h because it creates a circular inclusion with kthread.h eventually including psi_types.h and complaining on kthread structures not being defined because they are defined further in the kthread.h. Resolve this by removing psi_types.h inclusion from the headers included from kthread.h. Link: http://lkml.kernel.org/r/20190319235619.260832-7-surenb@xxxxxxxxxx Signed-off-by: Suren Baghdasaryan <surenb@xxxxxxxxxx> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Dennis Zhou <dennis@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Li Zefan <lizefan@xxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/drivers/spi/spi-rockchip.c~refactor-header-includes-to-allow-kthreadh-inclusion-in-psi_typesh +++ a/drivers/spi/spi-rockchip.c @@ -15,6 +15,7 @@ #include <linux/clk.h> #include <linux/dmaengine.h> +#include <linux/interrupt.h> #include <linux/module.h> #include <linux/of.h> #include <linux/pinctrl/consumer.h> --- a/include/linux/kthread.h~refactor-header-includes-to-allow-kthreadh-inclusion-in-psi_typesh +++ a/include/linux/kthread.h @@ -4,7 +4,6 @@ /* Simple interface for creating and stopping kernel threads without mess. */ #include <linux/err.h> #include <linux/sched.h> -#include <linux/cgroup.h> __printf(4, 5) struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), @@ -198,6 +197,8 @@ bool kthread_cancel_delayed_work_sync(st void kthread_destroy_worker(struct kthread_worker *worker); +struct cgroup_subsys_state; + #ifdef CONFIG_BLK_CGROUP void kthread_associate_blkcg(struct cgroup_subsys_state *css); struct cgroup_subsys_state *kthread_blkcg(void); --- a/include/linux/sched.h~refactor-header-includes-to-allow-kthreadh-inclusion-in-psi_typesh +++ a/include/linux/sched.h @@ -26,7 +26,6 @@ #include <linux/latencytop.h> #include <linux/sched/prio.h> #include <linux/signal_types.h> -#include <linux/psi_types.h> #include <linux/mm_types_task.h> #include <linux/task_io_accounting.h> #include <linux/rseq.h> --- a/kernel/kthread.c~refactor-header-includes-to-allow-kthreadh-inclusion-in-psi_typesh +++ a/kernel/kthread.c @@ -11,6 +11,7 @@ #include <linux/kthread.h> #include <linux/completion.h> #include <linux/err.h> +#include <linux/cgroup.h> #include <linux/cpuset.h> #include <linux/unistd.h> #include <linux/file.h> _ Patches currently in -mm which might be from surenb@xxxxxxxxxx are psi-introduce-state_mask-to-represent-stalled-psi-states.patch psi-make-psi_enable-static.patch psi-rename-psi-fields-in-preparation-for-psi-trigger-addition.patch psi-rename-psi-fields-in-preparation-for-psi-trigger-addition-v6.patch psi-split-update_stats-into-parts.patch psi-track-changed-states.patch refactor-header-includes-to-allow-kthreadh-inclusion-in-psi_typesh.patch psi-introduce-psi-monitor.patch