struct mutex regex_lock;
};
-void ftrace_free_mem(void *start, void *end);
+void ftrace_free_init_mem(void);
#else
-static inline void ftrace_free_mem(void *start, void *end) { }
+static inline void ftrace_free_init_mem(void) { }
#endif
/*
}
static inline void clear_ftrace_function(void) { }
static inline void ftrace_kill(void) { }
-static inline void ftrace_free_mem(void *start, void *end) { }
+static inline void ftrace_free_init_mem(void) { }
#endif /* CONFIG_FUNCTION_TRACER */
#ifdef CONFIG_STACK_TRACER
kernel_init_freeable();
/* need to finish all async __init code before freeing the memory */
async_synchronize_full();
+ ftrace_free_init_mem();
free_initmem();
mark_readonly();
system_state = SYSTEM_RUNNING;
#include <trace/events/sched.h>
+#include <asm/sections.h>
#include <asm/setup.h>
#include "trace_output.h"
}
#endif /* CONFIG_MODULES */
-void ftrace_free_mem(void *start_ptr, void *end_ptr)
+void __init ftrace_free_init_mem(void)
{
- unsigned long start = (unsigned long)start_ptr;
- unsigned long end = (unsigned long)end_ptr;
+ unsigned long start = (unsigned long)(&__init_begin);
+ unsigned long end = (unsigned long)(&__init_end);
struct ftrace_page **last_pg = &ftrace_pages_start;
struct ftrace_page *pg;
struct dyn_ftrace *rec;
void *pos;
unsigned long pages = 0;
- /* This may be .init text, inform ftrace to remove it */
- ftrace_free_mem(start, end);
-
start = (void *)PAGE_ALIGN((unsigned long)start);
end = (void *)((unsigned long)end & PAGE_MASK);
for (pos = start; pos < end; pos += PAGE_SIZE, pages++) {