Messages in this thread | | | Date | Mon, 14 Apr 2014 11:16:00 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it |
| |
* Igor Mammedov <imammedo@redhat.com> wrote:
> /* > + * wait for ACK from master CPU before continuing > + * with AP initialization > + */ > + cpumask_set_cpu(cpu, cpu_initialized_mask); > + while (!cpumask_test_cpu(cpu, cpu_callout_mask)) > + cpu_relax();
> + /* > + * wait for ACK from master CPU before continuing > + * with AP initialization > + */ > + cpumask_set_cpu(cpu, cpu_initialized_mask); > + while (!cpumask_test_cpu(cpu, cpu_callout_mask)) > + cpu_relax();
That repetitive pattern could be stuck into a properly named helper inline function.
(Also, before the cpumask_set_cpu() we should probably do a WARN_ON() if the bit is already set.)
Thanks,
Ingo
| |