Gcc13 apparently infers from "if ( old_cpu < new_cpu )" that "new_cpu" is >= 1, and then (on x86) complains about "per_cpu(timers, new_cpu)" exceeding __per_cpu_offset[]'s bounds (being an array of 1 in such a configuration). Make the code conditional upon there being at least 2 CPUs configured (otherwise there simply is nothing to migrate [to]).
Signed-off-by: Jan Beulich <[email protected]> --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -356,6 +356,7 @@ bool timer_expires_before(struct timer * void migrate_timer(struct timer *timer, unsigned int new_cpu) { +#if CONFIG_NR_CPUS > 1 unsigned int old_cpu; bool_t active; unsigned long flags; @@ -404,6 +405,7 @@ void migrate_timer(struct timer *timer, spin_unlock(&per_cpu(timers, old_cpu).lock); spin_unlock_irqrestore(&per_cpu(timers, new_cpu).lock, flags); +#endif /* CONFIG_NR_CPUS > 1 */ }
