powerpc/smp: Factor out assign_threads()
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 14 Feb 2024 13:14:05 +0000 (00:14 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 14 Feb 2024 13:14:05 +0000 (00:14 +1100)
commit9832de654499f0bf797a3719c4d4c5bd401f18f5
treeea776e1a12bfbed429aa09d9d0e9d5b8eed4ab9c
parentdca79603fbc592ec7ea8bd7ba274052d3984e882
powerpc/smp: Factor out assign_threads()

Factor out the for loop that assigns CPU numbers to threads of a core.
The function takes the next CPU number to use as input, and returns the
next available CPU number after the threads has been assigned.

This will allow a subsequent change to assign threads out of order.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231229120107.2281153-4-mpe@ellerman.id.au
arch/powerpc/kernel/setup-common.c