lkml.org 
[lkml]   [2013]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 13/76] ARC: Low level IRQ/Trap/Exception Handling
On Saturday 19 January 2013 09:01 AM, Al Viro wrote:
> On Fri, Jan 18, 2013 at 05:54:27PM +0530, Vineet Gupta wrote:
>
>> + ; --- (Slow Path #3) notify_resume ---
>> +.Lchk_notify_resume:
>> + btst r9, TIF_NOTIFY_RESUME
>> + blnz @do_notify_resume
>> + b resume_user_mode_begin ; unconditionally back to U mode ret chks
>> + ; for single exit point from this block
> Umm... Can we even get there without NOTIFY_RESUME? Again, there's
> future-proofing and there's laying minefields - think what will happen
> if we *do* get there with some bit in _TIF_WORK_MASK that isn't recognized
> by any of these cases. Looping forever?

IMHO, for future safe-ing, the test for TIF_NOTIFY_RESUME is correct (as we will
need to add that check the moment a new bit is introduced in _TIF_WORK_MASK).

Regarding the infinite loop, I would assume that _TIF_WORK_MASK is golden (fixed
by your prior comment) so anyone touching it needs to add corresponding code here
- IMHO we don't need to handle that scenario (maybe add a comment in
thread_info.h). With that assumption, the unconditional branch would go back to
start and the re-test for TIF_WORK_MASK will break the loop even if any stray bit
was set.

So essentially we don't need any code change ! Am I overlooking something here ?

-Vineet


\
 
 \ /
  Last update: 2013-01-19 15:01    [W:0.122 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site