Skip to content

Commit 2885daf

Browse files
Sebastian Andrzej SiewiorPeter Zijlstra
authored andcommitted
lib/smp_processor_id: Make migration check unconditional of SMP
Commit cac5cef ("sched/smp: Make SMP unconditional") migrate_disable() even on UP builds. Commit 06ddd17 ("sched/smp: Always define is_percpu_thread() and scheduler_ipi()") made is_percpu_thread() check the affinity mask instead replying always true for UP mask. As a consequence smp_processor_id() now complains if invoked within a migrate_disable() section because is_percpu_thread() checks its mask and the migration check is left out. Make migration check unconditional of SMP. Fixes: cac5cef ("sched/smp: Make SMP unconditional") Closes: https://lore.kernel.org/oe-lkp/[email protected] Reported-by: kernel test robot <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Chen Yu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 0b9ca2d commit 2885daf

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/smp_processor_id.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ unsigned int check_preemption_disabled(const char *what1, const char *what2)
2222
if (is_percpu_thread())
2323
goto out;
2424

25-
#ifdef CONFIG_SMP
2625
if (current->migration_disabled)
2726
goto out;
28-
#endif
2927

3028
/*
3129
* It is valid to assume CPU-locality during early bootup:

0 commit comments

Comments
 (0)