Port-i386 archive

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

Re: [PATCH] Add intr_mask() / intr_unmask() interface to mask / unmask individual interrupt sources




> On Nov 30, 2019, at 3:17 PM, Jason Thorpe <thorpej%me.com@localhost> wrote:
> 
> Yah, on second thought, I don't think I will add that additional code... as far as I can tell, it's completely unnecessary (because it's all already serialized with cpu_lock) and would only add confusion.  I will add a comment about the mask count being protected with cpu_lock, however.

Ok, so I thought about this some more, and there is a problem there, but not the one you mentioned.

intr_mask() is intended to be callable from an interrupt handler, but you can't take the cpu_lock in that case, because that's a MUTEX_DEFAULT mutex.  The code can be tweaked to address this issue, but yes, places where the mask count is checked do need to be protected in a block that disables interrupts.

I'll post a follow-up patch shortly.

-- thorpej



Home | Main Index | Thread Index | Old Index