summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2019-03-14 16:01:02 +0000
committervisa <visa@openbsd.org>2019-03-14 16:01:02 +0000
commitfee69528d2cd998356813db0922e7fd576485f9c (patch)
tree6574799f7b17e80a97a9af8c5dda8e101e819f51
parentA little tidying in style_parse. (diff)
downloadwireguard-openbsd-fee69528d2cd998356813db0922e7fd576485f9c.tar.xz
wireguard-openbsd-fee69528d2cd998356813db0922e7fd576485f9c.zip
Fix the balancing of work queue interrupts.
The value of `ncpusfound' no longer reflects the number of cores that will be utilized by the kernel; it can be larger if secondary cores have not been enabled by the firmware. This can lead to incorrect assignment of work queue interrupts, making certain cnmac(4) ports unable to receive packets. This is a regression introduced in r1.108 of octeon/machdep.c. Correct the problem by using `ncpus' for the balancing. All secondary cores have been attached and the value is final by the time work queue interrupt handlers are set up. Network issue reported by krw@
-rw-r--r--sys/arch/octeon/dev/octciu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/octeon/dev/octciu.c b/sys/arch/octeon/dev/octciu.c
index c26c4005c48..042071fc98f 100644
--- a/sys/arch/octeon/dev/octciu.c
+++ b/sys/arch/octeon/dev/octciu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: octciu.c,v 1.10 2018/02/24 11:42:31 visa Exp $ */
+/* $OpenBSD: octciu.c,v 1.11 2019/03/14 16:01:02 visa Exp $ */
/*
* Copyright (c) 2000-2004 Opsycon AB (www.opsycon.se)
@@ -231,7 +231,7 @@ octciu_intr_establish(int irq, int level, int (*ih_fun)(void *),
#ifdef MULTIPROCESSOR
/* Span work queue interrupts across CPUs. */
if (IS_WORKQ_IRQ(irq))
- cpuid = irq % ncpusfound;
+ cpuid = irq % ncpus;
#endif
flags = (level & IPL_MPSAFE) ? IH_MPSAFE : 0;