perf intel-pt: Use itrace error flags to suppress some errors
[linux-2.6-microblaze.git] / kernel / kthread.c
index 132f84a..1d9e2fd 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/ptrace.h>
 #include <linux/uaccess.h>
 #include <linux/numa.h>
+#include <linux/sched/isolation.h>
 #include <trace/events/sched.h>
 
 
@@ -383,7 +384,8 @@ struct task_struct *__kthread_create_on_node(int (*threadfn)(void *data),
                 * The kernel thread should not inherit these properties.
                 */
                sched_setscheduler_nocheck(task, SCHED_NORMAL, &param);
-               set_cpus_allowed_ptr(task, cpu_all_mask);
+               set_cpus_allowed_ptr(task,
+                                    housekeeping_cpumask(HK_FLAG_KTHREAD));
        }
        kfree(create);
        return task;
@@ -608,7 +610,7 @@ int kthreadd(void *unused)
        /* Setup a clean context for our children to inherit. */
        set_task_comm(tsk, "kthreadd");
        ignore_signals(tsk);
-       set_cpus_allowed_ptr(tsk, cpu_all_mask);
+       set_cpus_allowed_ptr(tsk, housekeeping_cpumask(HK_FLAG_KTHREAD));
        set_mems_allowed(node_states[N_MEMORY]);
 
        current->flags |= PF_NOFREEZE;