Index: linux-2.6.16.16/kernel/ipipe/tracer.c =================================================================== --- linux-2.6.16.16.orig/kernel/ipipe/tracer.c +++ linux-2.6.16.16/kernel/ipipe/tracer.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -86,14 +87,9 @@ enum ipipe_trace_type }; -int ipipe_trace_enable = 1; +int ipipe_trace_enable = 0; -static struct ipipe_trace_path trace_paths[NR_CPUS][IPIPE_TRACE_PATHS] = - { [0 ... NR_CPUS-1] = - { [0 ... IPIPE_TRACE_PATHS-1] = - { .begin = -1, .end = -1 } - } - }; +static struct ipipe_trace_path *trace_paths[NR_CPUS]; static int active_path[NR_CPUS] = { [0 ... NR_CPUS-1] = IPIPE_DEFAULT_ACTIVE }; static int max_path[NR_CPUS] = @@ -1101,6 +1097,18 @@ void __init __ipipe_init_trace_proc(void { struct proc_dir_entry *trace_dir; struct proc_dir_entry *entry; + int i,j; + + for (i = 0; i < NR_CPUS; i++) { + trace_paths[i] = vmalloc(sizeof(struct ipipe_trace_path) * IPIPE_TRACE_PATHS); + if (!trace_paths) + return; + for (j = 0; j < IPIPE_TRACE_PATHS; j++) { + trace_paths[i][j].begin = -1; + trace_paths[i][j].end = -1; + } + } + ipipe_trace_enable = 1; trace_dir = create_proc_entry("trace", S_IFDIR, ipipe_proc_root);