Problem with atomicity of TIF for parisc ?
Helge Deller <[email protected]>
| Newsgroups | gmane.linux.ports.hppa |
|---|---|
| Message-ID | <[email protected]> |
While reading LKML I saw the patches by Mathieu Desnoyers <[email protected]> titled "Fix atomicity of TIF update in flush_thread() for XXX" e.g. http://permalink.gmane.org/gmane.linux.kernel/502597 Now I'm wondering if our thread-problems may be due the fact that we do not disable interrupts while testing the TIF_XX values in arch/parisc/kernel/entry.S, e.g.: intr_return: /* NOTE: Need to enable interrupts incase we schedule. */ ssm PSW_SM_I, %r0 <....> intr_check_resched: /* check for reschedule */ mfctl %cr30,%r1 LDREG TI_FLAGS(%r1),%r19 /* sched.h: TIF_NEED_RESCHED */ bb,<,n %r19,31-TIF_NEED_RESCHED,intr_do_resched /* forward */ Is the coding correct, or do we need to disable interrupts when checking TIF_NEED_RESCHED ? (There are more TIF_XXX places in entry.S as well which might need checking then...) Helge