kmod/core: remove ftrace hacks

These hacks were from a previous implementation and are no longer
needed.
This commit is contained in:
Josh Poimboeuf 2014-03-13 14:01:07 -05:00
parent 99dd4b53fb
commit 57f45c89e6

View File

@ -160,24 +160,12 @@ out:
return ret;
}
#define TRACE_INTERNAL_BIT (1<<11)
#define trace_recursion_clear(bit) do { (current)->trace_recursion &= ~(bit); } while (0)
void kpatch_ftrace_handler(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *regs)
{
int i;
struct kpatch_func *func = NULL;
/*
* FIXME: HACKS
*
* Deal with some of the peculiarities caused by the handler being
* called from __ftrace_ops_list_func instead of directly from
* ftrace_regs_caller.
*/
trace_recursion_clear(TRACE_INTERNAL_BIT);
preempt_enable_notrace();
/*
* TODO: if preemption is possible then we'll need to think about how
* to ensure atomic access to the array and how to ensure activeness
@ -208,7 +196,6 @@ void kpatch_ftrace_handler(unsigned long ip, unsigned long parent_ip,
return;
}
static struct ftrace_ops kpatch_ftrace_ops __read_mostly = {
.func = kpatch_ftrace_handler,
.flags = FTRACE_OPS_FL_SAVE_REGS,