Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom Initialize the workqueue to use IPL_NE...
details: https://anonhg.NetBSD.org/src/rev/410a594c59bd
branches: trunk
changeset: 781944:410a594c59bd
user: matt <matt%NetBSD.org@localhost>
date: Mon Oct 08 20:54:10 2012 +0000
description:
Initialize the workqueue to use IPL_NET for its mutex.
Prefer softints if the current lwp is the idle lwp.
diffstat:
sys/arch/arm/broadcom/bcm53xx_eth.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 0d38ef572f22 -r 410a594c59bd sys/arch/arm/broadcom/bcm53xx_eth.c
--- a/sys/arch/arm/broadcom/bcm53xx_eth.c Mon Oct 08 19:20:45 2012 +0000
+++ b/sys/arch/arm/broadcom/bcm53xx_eth.c Mon Oct 08 20:54:10 2012 +0000
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.8 2012/10/07 20:14:08 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.9 2012/10/08 20:54:10 matt Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -308,7 +308,7 @@
}
error = workqueue_create(&sc->sc_workq, xname, bcmeth_worker, sc,
- (PRI_USER + MAXPRI_USER) / 2, IPL_SOFTNET, WQ_MPSAFE|WQ_PERCPU);
+ (PRI_USER + MAXPRI_USER) / 2, IPL_NET, WQ_MPSAFE|WQ_PERCPU);
if (error) {
aprint_error(": failed to create workqueue: %d\n", error);
return;
@@ -1563,7 +1563,8 @@
* so let the workqueue deal with them.
*/
const uint32_t framecount = __SHIFTOUT(sc->sc_rcvlazy, INTRCVLAZY_FRAMECOUNT);
- if (descs < framecount) {
+ if (descs < framecount
+ || (curcpu()->ci_curlwp->l_flag & LW_IDLE)) {
soft_flags |= SOFT_RXINTR;
} else {
work_flags |= WORK_RXINTR;
Home |
Main Index |
Thread Index |
Old Index