Index: sys/intrmap.h =================================================================== RCS file: /cvs/src/sys/sys/intrmap.h,v retrieving revision 1.2 diff -u -p -r1.2 intrmap.h --- sys/intrmap.h 17 Jun 2020 03:01:26 -0000 1.2 +++ sys/intrmap.h 22 Jun 2020 00:20:24 -0000 @@ -34,5 +34,6 @@ void intrmap_align(const struct device unsigned int intrmap_count(const struct intrmap *); struct cpu_info *intrmap_cpu(const struct intrmap *, unsigned int); +struct cpu_info *intrmap_one(const struct device *); #endif /* _SYS_INTRMAP_H_ */ Index: kern/kern_intrmap.c =================================================================== RCS file: /cvs/src/sys/kern/kern_intrmap.c,v retrieving revision 1.2 diff -u -p -r1.2 kern_intrmap.c --- kern/kern_intrmap.c 17 Jun 2020 03:01:26 -0000 1.2 +++ kern/kern_intrmap.c 22 Jun 2020 00:20:24 -0000 @@ -345,3 +345,17 @@ intrmap_cpu(const struct intrmap *im, un " (intrmap %p)", icpu, ring, im); return (ic->ic_cpumap[icpu]); } + +struct cpu_info * +intrmap_one(const struct device *dv) +{ + unsigned int unit = dv->dv_unit; + struct intrmap_cpus *ic; + struct cpu_info *ci; + + ic = intrmap_cpus_get(); + ci = ic->ic_cpumap[unit % ic->ic_count]; + intrmap_cpus_put(ic); + + return (ci); +} Index: dev/pci/if_bge.c =================================================================== RCS file: /cvs/src/sys/dev/pci/if_bge.c,v retrieving revision 1.388 diff -u -p -r1.388 if_bge.c --- dev/pci/if_bge.c 9 Nov 2018 14:14:31 -0000 1.388 +++ dev/pci/if_bge.c 22 Jun 2020 00:20:24 -0000 @@ -85,6 +85,7 @@ #include #include #include +#include #include #include @@ -3068,7 +3069,8 @@ bge_attach(struct device *parent, struct /* Hookup IRQ last. */ DPRINTFN(5, ("pci_intr_establish\n")); - sc->bge_intrhand = pci_intr_establish(pc, ih, IPL_NET | IPL_MPSAFE, + sc->bge_intrhand = pci_intr_establish_cpu(pc, ih, IPL_NET | IPL_MPSAFE, + intrmap_one(&sc->bge_dev), bge_intr, sc, sc->bge_dev.dv_xname); if (sc->bge_intrhand == NULL) { printf(": couldn't establish interrupt");