sparc/srmmu: Remove on-stack cpumask var
authorDawei Li <dawei.li@shingroup.cn>
Wed, 24 Apr 2024 02:55:44 +0000 (10:55 +0800)
committerAndreas Larsson <andreas@gaisler.com>
Wed, 8 May 2024 17:42:15 +0000 (19:42 +0200)
commit7aba3a85daee7d81fbdbccc9d3d9a27dbd4b45aa
tree6c9f316047e30e17051524ffc301ec4f4c3a1528
parent48d85acdaa52f9ec0324b6c5aa044d1315ef90b2
sparc/srmmu: Remove on-stack cpumask var

In general it's preferable to avoid placing cpumasks on the stack, as
for large values of NR_CPUS these can consume significant amounts of
stack space and make stack overflows more likely.

Use cpumask_any_but() to avoid the need for a temporary cpumask on
the stack and simplify code.

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Link: https://lore.kernel.org/r/20240424025548.3765250-2-dawei.li@shingroup.cn
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
arch/sparc/mm/srmmu.c