Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158422
b: refs/heads/master
c: 066e037
h: refs/heads/master
v: v3
  • Loading branch information
Jason Baron authored and Frederic Weisbecker committed Aug 11, 2009
1 parent 39e43ac commit 6620a35
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eeac19a7efa150231e4a6bb110d6f27500bcc8ce
refs/heads/master: 066e0378c23f0a3db730893f6a041e4a3922a385
15 changes: 4 additions & 11 deletions trunk/arch/x86/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,31 +516,24 @@ int syscall_name_to_nr(char *name)
return -1;
}

void arch_init_ftrace_syscalls(void)
static int __init arch_init_ftrace_syscalls(void)
{
int i;
struct syscall_metadata *meta;
unsigned long **psys_syscall_table = &sys_call_table;
static atomic_t refs;

if (atomic_inc_return(&refs) != 1)
goto end;

syscalls_metadata = kzalloc(sizeof(*syscalls_metadata) *
FTRACE_SYSCALL_MAX, GFP_KERNEL);
if (!syscalls_metadata) {
WARN_ON(1);
return;
return -ENOMEM;
}

for (i = 0; i < FTRACE_SYSCALL_MAX; i++) {
meta = find_syscall_meta(psys_syscall_table[i]);
syscalls_metadata[i] = meta;
}
return;

/* Paranoid: avoid overflow */
end:
atomic_dec(&refs);
return 0;
}
arch_initcall(arch_init_ftrace_syscalls);
#endif
1 change: 0 additions & 1 deletion trunk/include/trace/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ struct syscall_metadata {
};

#ifdef CONFIG_FTRACE_SYSCALLS
extern void arch_init_ftrace_syscalls(void);
extern struct syscall_metadata *syscall_nr_to_meta(int nr);
extern void start_ftrace_syscalls(void);
extern void stop_ftrace_syscalls(void);
Expand Down
1 change: 0 additions & 1 deletion trunk/kernel/trace/trace_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ void start_ftrace_syscalls(void)
if (++refcount != 1)
goto unlock;

arch_init_ftrace_syscalls();
read_lock_irqsave(&tasklist_lock, flags);

do_each_thread(g, t) {
Expand Down

0 comments on commit 6620a35

Please sign in to comment.