Author: mmacy
Date: Mon May 28 23:14:38 2018
New Revision: 334299
URL: https://svnweb.freebsd.org/changeset/base/334299

Log:
  witness/hwpmc: fix locking order for pmc locks

Modified:
  head/sys/kern/subr_witness.c

Modified: head/sys/kern/subr_witness.c
==============================================================================
--- head/sys/kern/subr_witness.c        Mon May 28 23:12:26 2018        
(r334298)
+++ head/sys/kern/subr_witness.c        Mon May 28 23:14:38 2018        
(r334299)
@@ -499,12 +499,12 @@ static struct witness_order_list_entry order_lists[] =
        { "pipe mutex", &lock_class_mtx_sleep },
        { "sigio lock", &lock_class_mtx_sleep },
        { "process group", &lock_class_mtx_sleep },
-       { "process lock", &lock_class_mtx_sleep },
-       { "session", &lock_class_mtx_sleep },
-       { "uidinfo hash", &lock_class_rw },
 #ifdef HWPMC_HOOKS
        { "pmc-sleep", &lock_class_mtx_sleep },
 #endif
+       { "process lock", &lock_class_mtx_sleep },
+       { "session", &lock_class_mtx_sleep },
+       { "uidinfo hash", &lock_class_rw },
        { "time lock", &lock_class_mtx_sleep },
        { NULL, NULL },
        /*
@@ -671,9 +671,6 @@ static struct witness_order_list_entry order_lists[] =
        { "uart_hwmtx", &lock_class_mtx_spin },
        { "fast_taskqueue", &lock_class_mtx_spin },
        { "intr table", &lock_class_mtx_spin },
-#ifdef HWPMC_HOOKS
-       { "pmc-per-proc", &lock_class_mtx_spin },
-#endif
        { "process slock", &lock_class_mtx_spin },
        { "syscons video lock", &lock_class_mtx_spin },
        { "sleepq chain", &lock_class_mtx_spin },
@@ -690,6 +687,12 @@ static struct witness_order_list_entry order_lists[] =
 #ifdef __powerpc__
        { "tlb0", &lock_class_mtx_spin },
 #endif
+       { NULL, NULL },
+       { "sched lock", &lock_class_mtx_spin },
+#ifdef HWPMC_HOOKS
+       { "pmc-per-proc", &lock_class_mtx_spin },
+#endif
+       { NULL, NULL },
        /*
         * leaf locks
         */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to