mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
hw-breakpoints: Drop callback and task parameters from modify helper
Drop the callback and task parameters from modify_user_hw_breakpoint(). For now we have no user that need to modify a breakpoint to the point of changing its handler or its task context. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: "K. Prasad" <prasad@linux.vnet.ibm.com>
This commit is contained in:
parent
9cef30815b
commit
2f0993e0fb
3 changed files with 7 additions and 13 deletions
|
@ -618,7 +618,7 @@ ptrace_modify_breakpoint(struct perf_event *bp, int len, int type,
|
||||||
attr.bp_type = gen_type;
|
attr.bp_type = gen_type;
|
||||||
attr.disabled = disabled;
|
attr.disabled = disabled;
|
||||||
|
|
||||||
return modify_user_hw_breakpoint(bp, &attr, bp->callback, tsk);
|
return modify_user_hw_breakpoint(bp, &attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -740,7 +740,7 @@ static int ptrace_set_breakpoint_addr(struct task_struct *tsk, int nr,
|
||||||
|
|
||||||
attr = bp->attr;
|
attr = bp->attr;
|
||||||
attr.bp_addr = addr;
|
attr.bp_addr = addr;
|
||||||
bp = modify_user_hw_breakpoint(bp, &attr, bp->callback, tsk);
|
bp = modify_user_hw_breakpoint(bp, &attr);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* CHECKME: the previous code returned -EIO if the addr wasn't a
|
* CHECKME: the previous code returned -EIO if the addr wasn't a
|
||||||
|
|
|
@ -57,10 +57,7 @@ register_user_hw_breakpoint(struct perf_event_attr *attr,
|
||||||
|
|
||||||
/* FIXME: only change from the attr, and don't unregister */
|
/* FIXME: only change from the attr, and don't unregister */
|
||||||
extern struct perf_event *
|
extern struct perf_event *
|
||||||
modify_user_hw_breakpoint(struct perf_event *bp,
|
modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr);
|
||||||
struct perf_event_attr *attr,
|
|
||||||
perf_callback_t triggered,
|
|
||||||
struct task_struct *tsk);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Kernel breakpoints are not associated with any particular thread.
|
* Kernel breakpoints are not associated with any particular thread.
|
||||||
|
@ -97,9 +94,7 @@ register_user_hw_breakpoint(struct perf_event_attr *attr,
|
||||||
struct task_struct *tsk) { return NULL; }
|
struct task_struct *tsk) { return NULL; }
|
||||||
static inline struct perf_event *
|
static inline struct perf_event *
|
||||||
modify_user_hw_breakpoint(struct perf_event *bp,
|
modify_user_hw_breakpoint(struct perf_event *bp,
|
||||||
struct perf_event_attr *attr,
|
struct perf_event_attr *attr) { return NULL; }
|
||||||
perf_callback_t triggered,
|
|
||||||
struct task_struct *tsk) { return NULL; }
|
|
||||||
static inline struct perf_event *
|
static inline struct perf_event *
|
||||||
register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
|
register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
|
||||||
perf_callback_t triggered,
|
perf_callback_t triggered,
|
||||||
|
|
|
@ -312,9 +312,7 @@ EXPORT_SYMBOL_GPL(register_user_hw_breakpoint);
|
||||||
* @tsk: pointer to 'task_struct' of the process to which the address belongs
|
* @tsk: pointer to 'task_struct' of the process to which the address belongs
|
||||||
*/
|
*/
|
||||||
struct perf_event *
|
struct perf_event *
|
||||||
modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr,
|
modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr)
|
||||||
perf_callback_t triggered,
|
|
||||||
struct task_struct *tsk)
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* FIXME: do it without unregistering
|
* FIXME: do it without unregistering
|
||||||
|
@ -323,7 +321,8 @@ modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr,
|
||||||
*/
|
*/
|
||||||
unregister_hw_breakpoint(bp);
|
unregister_hw_breakpoint(bp);
|
||||||
|
|
||||||
return perf_event_create_kernel_counter(attr, -1, tsk->pid, triggered);
|
return perf_event_create_kernel_counter(attr, -1, bp->ctx->task->pid,
|
||||||
|
bp->callback);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(modify_user_hw_breakpoint);
|
EXPORT_SYMBOL_GPL(modify_user_hw_breakpoint);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue