tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ci_mtx_count issue on NetBSD/Milkymist



Hello,

I get this while working on my port of NetBSD to Milkymist (lm32) SoC:

panic: kernel diagnostic assertion "ci->ci_mtx_count == -1" failed: file "/home/ysionneau/perso/NetBSD/sys/kern/kern_synch.c", line 676 mi_switch: cpu0: ci_mtx_count (0) != -1 (block with spin-mutex held)

I put a watchpoint on lwp0->l_cpu->ci_mtx_count , in my port it is never modified and stays at value 0.

I've tried to understand how ci_mtx_count is supposed to be managed my MD code, so far I failed to understand. It seems some arch use spin_mutex and inc/dec ci_mtx_count upon spin_mutex_enter/exit.
Some other archs do it in softint handling.

Could someone give my some clue (or documentation) about the intended behaviour of curcpu()->ci_mtx_count please?

Thank you :)

Best regards,

--
Yann Sionneau


Home | Main Index | Thread Index | Old Index