diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 21 | ||||
-rw-r--r-- | arch/ia64/kernel/process.c | 9 |
2 files changed, 12 insertions, 18 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 78acd9fe97e9..f6b99719f10f 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -586,21 +586,6 @@ pfm_put_task(struct task_struct *task) | |||
586 | } | 586 | } |
587 | 587 | ||
588 | static inline void | 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) | 589 | pfm_reserve_page(unsigned long a) |
605 | { | 590 | { |
606 | SetPageReserved(vmalloc_to_page((void *)a)); | 591 | SetPageReserved(vmalloc_to_page((void *)a)); |
@@ -3724,7 +3709,7 @@ pfm_restart(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs) | |||
3724 | 3709 | ||
3725 | PFM_SET_WORK_PENDING(task, 1); | 3710 | PFM_SET_WORK_PENDING(task, 1); |
3726 | 3711 | ||
3727 | pfm_set_task_notify(task); | 3712 | tsk_set_notify_resume(task); |
3728 | 3713 | ||
3729 | /* | 3714 | /* |
3730 | * XXX: send reschedule if task runs on another CPU | 3715 | * XXX: send reschedule if task runs on another CPU |
@@ -5082,7 +5067,7 @@ pfm_handle_work(void) | |||
5082 | 5067 | ||
5083 | PFM_SET_WORK_PENDING(current, 0); | 5068 | PFM_SET_WORK_PENDING(current, 0); |
5084 | 5069 | ||
5085 | pfm_clear_task_notify(); | 5070 | tsk_clear_notify_resume(current); |
5086 | 5071 | ||
5087 | regs = task_pt_regs(current); | 5072 | regs = task_pt_regs(current); |
5088 | 5073 | ||
@@ -5450,7 +5435,7 @@ pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, str | |||
5450 | * when coming from ctxsw, current still points to the | 5435 | * when coming from ctxsw, current still points to the |
5451 | * previous task, therefore we must work with task and not current. | 5436 | * previous task, therefore we must work with task and not current. |
5452 | */ | 5437 | */ |
5453 | pfm_set_task_notify(task); | 5438 | tsk_set_notify_resume(task); |
5454 | } | 5439 | } |
5455 | /* | 5440 | /* |
5456 | * defer until state is changed (shorten spin window). the context is locked | 5441 | * defer until state is changed (shorten spin window). the context is locked |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 7377d323131d..5c9efe626563 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -157,6 +157,15 @@ show_regs (struct pt_regs *regs) | |||
157 | show_stack(NULL, NULL); | 157 | show_stack(NULL, NULL); |
158 | } | 158 | } |
159 | 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 | |||
160 | void | 169 | void |
161 | do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall) | 170 | do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall) |
162 | { | 171 | { |