]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
Don't run the MCA record refill task during boot.
authormarkj <markj@FreeBSD.org>
Wed, 14 Dec 2016 19:00:08 +0000 (19:00 +0000)
committermarkj <markj@FreeBSD.org>
Wed, 14 Dec 2016 19:00:08 +0000 (19:00 +0000)
The MCA taskqueue is not initialized until some time after CMCIs are
enabled on the BSP.

Reviewed by: cem, jhb
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8783

sys/x86/x86/mca.c

index d005180415bedb71333c8f112f0ee07978044d2b..1d99efc74ed8f7c3587de02f27c36222525489e1 100644 (file)
@@ -508,7 +508,7 @@ mca_record_entry(enum scan_mode mode, const struct mca_record *record)
        STAILQ_INSERT_TAIL(&mca_records, rec, link);
        mca_count++;
        mtx_unlock_spin(&mca_lock);
-       if (mode == CMCI)
+       if (mode == CMCI && !cold)
                taskqueue_enqueue(mca_tq, &mca_refill_task);
 }
 
@@ -714,6 +714,9 @@ mca_createtq(void *dummy)
        mca_tq = taskqueue_create_fast("mca", M_WAITOK,
            taskqueue_thread_enqueue, &mca_tq);
        taskqueue_start_threads(&mca_tq, 1, PI_SWI(SWI_TQ), "mca taskq");
+
+       /* CMCIs during boot may have claimed items from the freelist. */
+       mca_fill_freelist();
 }
 SYSINIT(mca_createtq, SI_SUB_CONFIGURE, SI_ORDER_ANY, mca_createtq, NULL);