Source-Changes-D archive

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

Re: CVS commit: src/sys/arch




> On Dec 23, 2019, at 7:53 PM, Taylor R Campbell <campbell+netbsd-source-changes-d%mumble.net@localhost> wrote:
> 
>> Module Name:    src
>> Committed By:   thorpej
>> Date:           Sun Dec 22 15:09:39 UTC 2019
>> 
>> Add intr_mask() and corresponding intr_unmask() calls that allow specific
>> interrupt lines / sources to be masked as needed (rather than making a
>> set of sources by IPL as with spl*()).
>> 
>> +       if (ci == curcpu() || !mp_online) {
>> +               intr_hwunmask_xcall(ih, NULL);
>> +       } else {
>> +               where = xc_unicast(0, intr_hwunmask_xcall, ih, NULL, ci);
>> +               xc_wait(where);
>> +       }
> 
> If this conditional is necessary, we should teach xc_unicast to make
> it unnecessary.

Agreed.  I followed the existing patter in intr.c.  Andrew pointed out in code review that the xcall code does at the the !mp_online bit now, but:

1- It does not do the curcpu() check.
2- It also fiddles with interrupt state.

For that reason, I was hesitant to make that change until further investigation was done.

-- thorpej



Home | Main Index | Thread Index | Old Index