Re: [PATCH] x86: dovetail: Call trap exit code with hard IRQs disabled

Philippe Gerum <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <87bjdexrn2.fsf@2a02-842b-4100-f601-1469-181b-22db-b4d0.rev.sfr.net>
Philippe Gerum <[email protected]> writes:

> Florian Bezdeka <[email protected]> writes:
>
>> mark_trap_exit() should do the reverse operations of mark_trap_entry()
>> keeping ordering in mind. Especially as oob_trap_unwind() is expecting
>> hard IRQs to be off.
>>
>
> oob_trap_unwind() does not require irqs to be disabled,
> __oob_trap_unwind() already takes care of this. However, we do want
> oob_trap_unwind() to return with irqs off unconditionally because
> handle_oob_trap_exit() might not ensure this. So the original ordering
> is right.

A better fix may be to disable hard irqs right before leaving
__oob_trap_unwind(), instead of expecting handle_oob_trap_exit() - which
is user-provided - to do so. This would make things clearer, and the
conditional disabling in mark_trap_exit() pointless.

-- 
Philippe.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.