NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/52462: aac driver (and possibly others) needs MPification
> These are the drivers behind ld(4):
Thanks for the inspection of the drivers.
> But if that's everything, then wrapping the aac driver entry
> with kernel lock should have been sufficient.
Well, it provably wasn't sufficient to do
RCS file: /cvsroot/src/sys/dev/ic/ld_aac.c,v
retrieving revision 1.30
diff -p -u -r1.30 ld_aac.c
--- ld_aac.c 27 Sep 2016 03:33:32 -0000 1.30
+++ ld_aac.c 3 Aug 2017 14:20:19 -0000
@@ -314,9 +314,14 @@ ld_aac_dobio(struct ld_aac_softc *sc, vo
static int
ld_aac_start(struct ld_softc *ld, struct buf *bp)
{
+ int rc;
- return (ld_aac_dobio((struct ld_aac_softc *)ld, bp->b_data,
- bp->b_bcount, bp->b_rawblkno, (bp->b_flags & B_READ) == 0, bp));
+ KERNEL_LOCK(1, curlwp);
+ rc = ld_aac_dobio((struct ld_aac_softc *)ld, bp->b_data,
+ bp->b_bcount, bp->b_rawblkno, (bp->b_flags & B_READ) == 0, bp);
+ KERNEL_UNLOCK_ONE(curlwp);
+
+ return rc;
}
static void
as you provided privately. What then happens is that the kernel
goes into inactivity when the user-land startup tries to start
BIND, and when I break into DDB I repeatedly get this as the
traceback:
db{0}> trace
breakpoint() at netbsd:breakpoint+0x5
comintr() at netbsd:comintr+0x59a
Xintr_ioapic_edge8() at netbsd:Xintr_ioapic_edge8+0xee
--- interrupt ---
x86_pause() at netbsd:x86_pause
lddone() at netbsd:lddone+0x1e
aac_new_intr() at netbsd:aac_new_intr+0xed
intr_biglock_wrapper() at netbsd:intr_biglock_wrapper+0x1d
Xintr_ioapic_level1() at netbsd:Xintr_ioapic_level1+0xf2
--- interrupt ---
x86_stihlt() at netbsd:x86_stihlt+0x6
acpicpu_cstate_idle_enter() at netbsd:acpicpu_cstate_idle_enter+0xdb
acpicpu_cstate_idle() at netbsd:acpicpu_cstate_idle+0xb6
idle_loop() at netbsd:idle_loop+0x18c
db{0}> c
...
db{0}> tra
breakpoint() at netbsd:breakpoint+0x5
comintr() at netbsd:comintr+0x59a
Xintr_ioapic_edge8() at netbsd:Xintr_ioapic_edge8+0xee
--- interrupt ---
x86_pause() at netbsd:x86_pause+0x2
lddone() at netbsd:lddone+0x1e
aac_new_intr() at netbsd:aac_new_intr+0xed
intr_biglock_wrapper() at netbsd:intr_biglock_wrapper+0x1d
Xintr_ioapic_level1() at netbsd:Xintr_ioapic_level1+0xf2
--- interrupt ---
x86_stihlt() at netbsd:x86_stihlt+0x6
acpicpu_cstate_idle_enter() at netbsd:acpicpu_cstate_idle_enter+0xdb
acpicpu_cstate_idle() at netbsd:acpicpu_cstate_idle+0xb6
idle_loop() at netbsd:idle_loop+0x18c
db{0}> call cpu_reset
and no further progress was apparently being made.
Regards,
- Håvard
Home |
Main Index |
Thread Index |
Old Index