x86_64/mwait: Sysctl write is protected; no need to protect it again here.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 17 Jun 2015 14:53:53 +0000 (22:53 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 19 Jun 2015 06:37:03 +0000 (14:37 +0800)
sys/platform/pc64/x86_64/machdep.c

index e68455f..e0607c0 100644 (file)
@@ -223,7 +223,6 @@ static int                  cpu_mwait_c3_preamble =
 SYSCTL_STRING(_machdep_mwait_CX, OID_AUTO, supported, CTLFLAG_RD,
     cpu_mwait_cx_supported, 0, "MWAIT supported C states");
 
-static struct lwkt_serialize cpu_mwait_cx_slize = LWKT_SERIALIZE_INITIALIZER;
 static int     cpu_mwait_cx_select_sysctl(SYSCTL_HANDLER_ARGS,
                    int *, boolean_t);
 static int     cpu_mwait_cx_idle_sysctl(SYSCTL_HANDLER_ARGS);
@@ -2764,10 +2763,8 @@ cpu_mwait_cx_idle_sysctl(SYSCTL_HANDLER_ARGS)
 {
        int error;
 
-       lwkt_serialize_enter(&cpu_mwait_cx_slize);
        error = cpu_mwait_cx_select_sysctl(oidp, arg1, arg2, req,
            &cpu_mwait_halt, TRUE);
-       lwkt_serialize_exit(&cpu_mwait_cx_slize);
        return error;
 }
 
@@ -2776,9 +2773,7 @@ cpu_mwait_cx_spin_sysctl(SYSCTL_HANDLER_ARGS)
 {
        int error;
 
-       lwkt_serialize_enter(&cpu_mwait_cx_slize);
        error = cpu_mwait_cx_select_sysctl(oidp, arg1, arg2, req,
            &cpu_mwait_spin, FALSE);
-       lwkt_serialize_exit(&cpu_mwait_cx_slize);
        return error;
 }