Module Name: src
Committed By: yamaguchi
Date: Tue Feb 25 07:05:58 UTC 2020
Modified Files:
src/sys/dev/pci: if_ixl.c
Log Message:
Remove WQ_PERCPU flag for the workqueue that does configurations
such as link up and down
And added kpreempt_disable and kpreempt_enable around
workqueue_enqueue to call it in non-WQ_PERCPU thread context.
pointed out and reviewed by [email protected]., thanks.
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/if_ixl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.43 src/sys/dev/pci/if_ixl.c:1.44
--- src/sys/dev/pci/if_ixl.c:1.43 Tue Feb 25 07:00:26 2020
+++ src/sys/dev/pci/if_ixl.c Tue Feb 25 07:05:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ixl.c,v 1.43 2020/02/25 07:00:26 yamaguchi Exp $ */
+/* $NetBSD: if_ixl.c,v 1.44 2020/02/25 07:05:57 yamaguchi Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.43 2020/02/25 07:00:26 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.44 2020/02/25 07:05:57 yamaguchi Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -1341,7 +1341,7 @@ ixl_attach(device_t parent, device_t sel
snprintf(xnamebuf, sizeof(xnamebuf), "%s_wq_cfg", device_xname(self));
sc->sc_workq = ixl_workq_create(xnamebuf, IXL_WORKQUEUE_PRI,
- IPL_NET, WQ_PERCPU | WQ_MPSAFE);
+ IPL_NET, WQ_MPSAFE);
if (sc->sc_workq == NULL)
goto teardown_sysctls;
@@ -6642,7 +6642,9 @@ ixl_work_add(struct workqueue *wq, struc
if (atomic_cas_uint(&work->ixw_added, 0, 1) != 0)
return;
+ kpreempt_disable();
workqueue_enqueue(wq, &work->ixw_cookie, NULL);
+ kpreempt_enable();
}
static void