[IA64] Rename TIF_PERFMON_WORK back to TIF_NOTIFY_RESUME

Since the RSE synchronization will need a TIF_ flag, but all

work-to-be-done bits are already used, so we have to multiplex
TIF_NOTIFY_RESUME again.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by Petr Tesarik and committed by Tony Luck 5aa92ffd ad9e39c7

+18 -21
+3 -18
arch/ia64/kernel/perfmon.c
··· 586 } 587 588 static inline void 589 - pfm_set_task_notify(struct task_struct *task) 590 - { 591 - struct thread_info *info; 592 - 593 - info = (struct thread_info *) ((char *) task + IA64_TASK_SIZE); 594 - set_bit(TIF_PERFMON_WORK, &info->flags); 595 - } 596 - 597 - static inline void 598 - pfm_clear_task_notify(void) 599 - { 600 - clear_thread_flag(TIF_PERFMON_WORK); 601 - } 602 - 603 - static inline void 604 pfm_reserve_page(unsigned long a) 605 { 606 SetPageReserved(vmalloc_to_page((void *)a)); ··· 3709 3710 PFM_SET_WORK_PENDING(task, 1); 3711 3712 - pfm_set_task_notify(task); 3713 3714 /* 3715 * XXX: send reschedule if task runs on another CPU ··· 5067 5068 PFM_SET_WORK_PENDING(current, 0); 5069 5070 - pfm_clear_task_notify(); 5071 5072 regs = task_pt_regs(current); 5073 ··· 5435 * when coming from ctxsw, current still points to the 5436 * previous task, therefore we must work with task and not current. 5437 */ 5438 - pfm_set_task_notify(task); 5439 } 5440 /* 5441 * defer until state is changed (shorten spin window). the context is locked
··· 586 } 587 588 static inline void 589 pfm_reserve_page(unsigned long a) 590 { 591 SetPageReserved(vmalloc_to_page((void *)a)); ··· 3724 3725 PFM_SET_WORK_PENDING(task, 1); 3726 3727 + tsk_set_notify_resume(task); 3728 3729 /* 3730 * XXX: send reschedule if task runs on another CPU ··· 5082 5083 PFM_SET_WORK_PENDING(current, 0); 5084 5085 + tsk_clear_notify_resume(current); 5086 5087 regs = task_pt_regs(current); 5088 ··· 5450 * when coming from ctxsw, current still points to the 5451 * previous task, therefore we must work with task and not current. 5452 */ 5453 + tsk_set_notify_resume(task); 5454 } 5455 /* 5456 * defer until state is changed (shorten spin window). the context is locked
+9
arch/ia64/kernel/process.c
··· 157 show_stack(NULL, NULL); 158 } 159 160 void 161 do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall) 162 {
··· 157 show_stack(NULL, NULL); 158 } 159 160 + void tsk_clear_notify_resume(struct task_struct *tsk) 161 + { 162 + #ifdef CONFIG_PERFMON 163 + if (tsk->thread.pfm_needs_checking) 164 + return; 165 + #endif 166 + clear_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME); 167 + } 168 + 169 void 170 do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall) 171 {
+6 -3
include/asm-ia64/thread_info.h
··· 71 #define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) 72 #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) 73 74 #endif /* !__ASSEMBLY */ 75 76 /* ··· 88 #define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */ 89 #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ 90 #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ 91 - #define TIF_PERFMON_WORK 6 /* work for pfm_handle_work() */ 92 #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 93 #define TIF_MEMDIE 17 94 #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ ··· 100 #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 101 #define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) 102 #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) 103 - #define _TIF_PERFMON_WORK (1 << TIF_PERFMON_WORK) 104 #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 105 #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 106 #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) ··· 109 #define _TIF_FREEZE (1 << TIF_FREEZE) 110 111 /* "work to do on user-return" bits */ 112 - #define TIF_ALLWORK_MASK (_TIF_SIGPENDING|_TIF_PERFMON_WORK|_TIF_SYSCALL_AUDIT|\ 113 _TIF_NEED_RESCHED| _TIF_SYSCALL_TRACE|\ 114 _TIF_RESTORE_SIGMASK) 115 /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */
··· 71 #define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) 72 #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) 73 74 + #define tsk_set_notify_resume(tsk) \ 75 + set_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME) 76 + extern void tsk_clear_notify_resume(struct task_struct *tsk); 77 #endif /* !__ASSEMBLY */ 78 79 /* ··· 85 #define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */ 86 #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ 87 #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ 88 + #define TIF_NOTIFY_RESUME 6 /* resumption notification requested */ 89 #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 90 #define TIF_MEMDIE 17 91 #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ ··· 97 #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 98 #define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) 99 #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) 100 + #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 101 #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 102 #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 103 #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) ··· 106 #define _TIF_FREEZE (1 << TIF_FREEZE) 107 108 /* "work to do on user-return" bits */ 109 + #define TIF_ALLWORK_MASK (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SYSCALL_AUDIT|\ 110 _TIF_NEED_RESCHED| _TIF_SYSCALL_TRACE|\ 111 _TIF_RESTORE_SIGMASK) 112 /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */