On Wed, Jan 13, 2016 at 01:30:39PM +0200, timo.my...@wickedbsd.net wrote: > >Synopsis: kernel panic when booting MP kernel, SP works > >Category: kernel > >Environment: > System : OpenBSD 5.9 > Details : OpenBSD 5.9-beta (GENERIC) #1679: Fri Jan 8 23:44:41 MST > 2016 > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC > > Architecture: OpenBSD.amd64 > Machine : amd64 > >Description: > Updated to latest snapshot and I get kernel panic when booting the > GENERIC.MP kernel. > SP kernel works. > > kernel: integer divide fault trap, code=0 > Stopped at ar5008_set_delta_slope+0x40: idivl %ecx,%eax
It's probably crashing because c->ic_freq is zero here: /* Set Delta Slope (exponent and mantissa). */ coeff = (100 << 24) / c->ic_freq; This smells like the iwn(4) RXON SYSASSERT issue fixed this morning. Given that the driver starts out using a channel that hasn't been initialized, I don't understand how this code ever worked. Does this diff help? If it does, we should check all other drivers for the same problem. Index: athn.c =================================================================== RCS file: /cvs/src/sys/dev/ic/athn.c,v retrieving revision 1.92 diff -u -p -r1.92 athn.c --- athn.c 5 Jan 2016 18:41:15 -0000 1.92 +++ athn.c 13 Jan 2016 12:07:32 -0000 @@ -333,8 +333,8 @@ athn_attach(struct athn_softc *sc) /* Get the list of authorized/supported channels. */ athn_get_chanlist(sc); - /* IBSS channel undefined for now. */ - ic->ic_ibss_chan = &ic->ic_channels[0]; + /* Use channel 1 as initial channel. */ + ic->ic_ibss_chan = &ic->ic_channels[1]; ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;