Fix geli after last commit for UP systems that are running SMP kernel.

Submitted by:	Hyo geol, Lee <hyogeollee@gmail.com>
MFC after:	1 week
This commit is contained in:
Pawel Jakub Dawidek 2007-03-02 09:38:16 +00:00
parent c66d760608
commit b942093961
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167164

View File

@ -326,7 +326,8 @@ g_eli_worker(void *arg)
sc = wr->w_softc;
#ifdef SMP
/* Before sched_bind() to a CPU, wait for all CPUs to go on-line. */
if (sc->sc_crypto == G_ELI_CRYPTO_SW && g_eli_threads == 0) {
if (mp_ncpus > 1 && sc->sc_crypto == G_ELI_CRYPTO_SW &&
g_eli_threads == 0) {
while (!smp_started)
tsleep(wr, 0, "geli:smp", hz / 4);
}