Commit 5aa92ffd authored by Petr Tesarik's avatar Petr Tesarik Committed by Tony Luck

[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: default avatarShaohua Li <shaohua.li@intel.com>
Signed-off-by: default avatarPetr Tesarik <ptesarik@suse.cz>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent ad9e39c7
...@@ -585,21 +585,6 @@ pfm_put_task(struct task_struct *task) ...@@ -585,21 +585,6 @@ pfm_put_task(struct task_struct *task)
if (task != current) put_task_struct(task); if (task != current) put_task_struct(task);
} }
static inline void
pfm_set_task_notify(struct task_struct *task)
{
struct thread_info *info;
info = (struct thread_info *) ((char *) task + IA64_TASK_SIZE);
set_bit(TIF_PERFMON_WORK, &info->flags);
}
static inline void
pfm_clear_task_notify(void)
{
clear_thread_flag(TIF_PERFMON_WORK);
}
static inline void static inline void
pfm_reserve_page(unsigned long a) pfm_reserve_page(unsigned long a)
{ {
...@@ -3724,7 +3709,7 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) ...@@ -3724,7 +3709,7 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
PFM_SET_WORK_PENDING(task, 1); PFM_SET_WORK_PENDING(task, 1);
pfm_set_task_notify(task); tsk_set_notify_resume(task);
/* /*
* XXX: send reschedule if task runs on another CPU * XXX: send reschedule if task runs on another CPU
...@@ -5082,7 +5067,7 @@ pfm_handle_work(void) ...@@ -5082,7 +5067,7 @@ pfm_handle_work(void)
PFM_SET_WORK_PENDING(current, 0); PFM_SET_WORK_PENDING(current, 0);
pfm_clear_task_notify(); tsk_clear_notify_resume(current);
regs = task_pt_regs(current); regs = task_pt_regs(current);
...@@ -5450,7 +5435,7 @@ pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, str ...@@ -5450,7 +5435,7 @@ pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, str
* when coming from ctxsw, current still points to the * when coming from ctxsw, current still points to the
* previous task, therefore we must work with task and not current. * previous task, therefore we must work with task and not current.
*/ */
pfm_set_task_notify(task); tsk_set_notify_resume(task);
} }
/* /*
* defer until state is changed (shorten spin window). the context is locked * defer until state is changed (shorten spin window). the context is locked
......
...@@ -157,6 +157,15 @@ show_regs (struct pt_regs *regs) ...@@ -157,6 +157,15 @@ show_regs (struct pt_regs *regs)
show_stack(NULL, NULL); show_stack(NULL, NULL);
} }
void tsk_clear_notify_resume(struct task_struct *tsk)
{
#ifdef CONFIG_PERFMON
if (tsk->thread.pfm_needs_checking)
return;
#endif
clear_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME);
}
void void
do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall) do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall)
{ {
......
...@@ -71,6 +71,9 @@ struct thread_info { ...@@ -71,6 +71,9 @@ struct thread_info {
#define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) #define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER))
#define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER)
#define tsk_set_notify_resume(tsk) \
set_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME)
extern void tsk_clear_notify_resume(struct task_struct *tsk);
#endif /* !__ASSEMBLY */ #endif /* !__ASSEMBLY */
/* /*
...@@ -85,7 +88,7 @@ struct thread_info { ...@@ -85,7 +88,7 @@ struct thread_info {
#define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */ #define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */
#define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */
#define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */
#define TIF_PERFMON_WORK 6 /* work for pfm_handle_work() */ #define TIF_NOTIFY_RESUME 6 /* resumption notification requested */
#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
#define TIF_MEMDIE 17 #define TIF_MEMDIE 17
#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */
...@@ -97,7 +100,7 @@ struct thread_info { ...@@ -97,7 +100,7 @@ struct thread_info {
#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
#define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) #define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP)
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
#define _TIF_PERFMON_WORK (1 << TIF_PERFMON_WORK) #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
...@@ -106,7 +109,7 @@ struct thread_info { ...@@ -106,7 +109,7 @@ struct thread_info {
#define _TIF_FREEZE (1 << TIF_FREEZE) #define _TIF_FREEZE (1 << TIF_FREEZE)
/* "work to do on user-return" bits */ /* "work to do on user-return" bits */
#define TIF_ALLWORK_MASK (_TIF_SIGPENDING|_TIF_PERFMON_WORK|_TIF_SYSCALL_AUDIT|\ #define TIF_ALLWORK_MASK (_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SYSCALL_AUDIT|\
_TIF_NEED_RESCHED| _TIF_SYSCALL_TRACE|\ _TIF_NEED_RESCHED| _TIF_SYSCALL_TRACE|\
_TIF_RESTORE_SIGMASK) _TIF_RESTORE_SIGMASK)
/* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment