]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/xmon: simplify xmon_batch_next_cpu()
authorYury Norov <yury.norov@gmail.com>
Tue, 28 Jan 2025 16:46:33 +0000 (11:46 -0500)
committerYury Norov <yury.norov@gmail.com>
Mon, 24 Feb 2025 21:37:22 +0000 (16:37 -0500)
commit40ba13b430cb2202ce939a5cd7ff90b7d60aca7f
tree90bb5ec892ac3e27a558c7e16accb628bf1f8bcb
parent2a402aa64c10251093273656891bf788cd95677f
powerpc/xmon: simplify xmon_batch_next_cpu()

The function opencodes for_each_cpu_wrap() macro. As a loop termination
condition it uses cpumask_empty(), which is O(N), and it makes the whole
algorithm O(N^2). Switching to for_each_cpu_wrap() simplifies the logic,
and makes the algorithm linear.

Signed-off-by: Yury Norov <yury.norov@gmail.com>
arch/powerpc/xmon/xmon.c