[RFC PATCH 4/5] powerpc/smp: Factor out assign_threads()

Aneesh Kumar K.V aneesh.kumar at kernel.org
Tue Jan 2 15:34:42 AEDT 2024


Michael Ellerman <mpe at ellerman.id.au> writes:

....
  
> +static int assign_threads(unsigned cpu, unsigned int nthreads, bool avail,
>

May be rename 'avail' to 'present'

> +                          const __be32 *hw_ids)
> +{
> +	for (int i = 0; i < nthreads && cpu < nr_cpu_ids; i++) {
> +		__be32 hwid;
> +
> +		hwid = be32_to_cpu(hw_ids[i]);
> +
> +		DBG("    thread %d -> cpu %d (hard id %d)\n", i, cpu, hwid);
> +
> +		set_cpu_present(cpu, avail);
> +		set_cpu_possible(cpu, true);
> +		cpu_to_phys_id[cpu] = hwid;
> +		cpu++;
> +	}
> +

-aneesh


More information about the Linuxppc-dev mailing list