lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 14 Apr 2014 11:16:00 +0200 From: Ingo Molnar <mingo@...nel.org> To: Igor Mammedov <imammedo@...hat.com> Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com, hpa@...or.com, x86@...nel.org, bp@...e.de, paul.gortmaker@...driver.com, JBeulich@...e.com, prarit@...hat.com, drjones@...hat.com, toshi.kani@...com, riel@...hat.com, gong.chen@...ux.intel.com, andi@...stfloor.org, lenb@...nel.org, rjw@...ysocki.net, linux-acpi@...r.kernel.org Subject: Re: [PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it * Igor Mammedov <imammedo@...hat.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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists