mirror of
https://github.com/torvalds/linux.git
synced 2025-08-15 14:11:42 +02:00
lib/smp_processor_id: Make migration check unconditional of SMP
Commitcac5cefbad
("sched/smp: Make SMP unconditional") migrate_disable() even on UP builds. Commit06ddd17521
("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:cac5cefbad
("sched/smp: Make SMP unconditional") Closes: https://lore.kernel.org/oe-lkp/202507100448.6b88d6f1-lkp@intel.com Reported-by: kernel test robot <oliver.sang@intel.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Chen Yu <yu.c.chen@intel.com> Link: https://lore.kernel.org/r/20250710082748.-DPO1rjO@linutronix.de
This commit is contained in:
parent
0b9ca2dcab
commit
2885daf470
1 changed files with 0 additions and 2 deletions
|
@ -22,10 +22,8 @@ unsigned int check_preemption_disabled(const char *what1, const char *what2)
|
||||||
if (is_percpu_thread())
|
if (is_percpu_thread())
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
if (current->migration_disabled)
|
if (current->migration_disabled)
|
||||||
goto out;
|
goto out;
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It is valid to assume CPU-locality during early bootup:
|
* It is valid to assume CPU-locality during early bootup:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue