@@ -110,11 +110,6 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
110110}
111111
112112int kstack_depth_to_print = 12 ;
113- #ifdef CONFIG_STACK_UNWIND
114- static int call_trace = 1 ;
115- #else
116- #define call_trace (-1)
117- #endif
118113
119114#ifdef CONFIG_KALLSYMS
120115void printk_address (unsigned long address )
@@ -217,32 +212,6 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
217212 return NULL ;
218213}
219214
220- struct ops_and_data {
221- struct stacktrace_ops * ops ;
222- void * data ;
223- };
224-
225- static int dump_trace_unwind (struct unwind_frame_info * info , void * context )
226- {
227- struct ops_and_data * oad = (struct ops_and_data * )context ;
228- int n = 0 ;
229- unsigned long sp = UNW_SP (info );
230-
231- if (arch_unw_user_mode (info ))
232- return -1 ;
233- while (unwind (info ) == 0 && UNW_PC (info )) {
234- n ++ ;
235- oad -> ops -> address (oad -> data , UNW_PC (info ));
236- if (arch_unw_user_mode (info ))
237- break ;
238- if ((sp & ~(PAGE_SIZE - 1 )) == (UNW_SP (info ) & ~(PAGE_SIZE - 1 ))
239- && sp > UNW_SP (info ))
240- break ;
241- sp = UNW_SP (info );
242- }
243- return n ;
244- }
245-
246215#define MSG (txt ) ops->warning(data, txt)
247216
248217/*
@@ -270,40 +239,6 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
270239 if (!tsk )
271240 tsk = current ;
272241
273- if (call_trace >= 0 ) {
274- int unw_ret = 0 ;
275- struct unwind_frame_info info ;
276- struct ops_and_data oad = { .ops = ops , .data = data };
277-
278- if (regs ) {
279- if (unwind_init_frame_info (& info , tsk , regs ) == 0 )
280- unw_ret = dump_trace_unwind (& info , & oad );
281- } else if (tsk == current )
282- unw_ret = unwind_init_running (& info , dump_trace_unwind ,
283- & oad );
284- else {
285- if (unwind_init_blocked (& info , tsk ) == 0 )
286- unw_ret = dump_trace_unwind (& info , & oad );
287- }
288- if (unw_ret > 0 ) {
289- if (call_trace == 1 && !arch_unw_user_mode (& info )) {
290- ops -> warning_symbol (data ,
291- "DWARF2 unwinder stuck at %s" ,
292- UNW_PC (& info ));
293- if ((long )UNW_SP (& info ) < 0 ) {
294- MSG ("Leftover inexact backtrace:" );
295- stack = (unsigned long * )UNW_SP (& info );
296- if (!stack )
297- goto out ;
298- } else
299- MSG ("Full inexact backtrace again:" );
300- } else if (call_trace >= 1 )
301- goto out ;
302- else
303- MSG ("Full inexact backtrace again:" );
304- } else
305- MSG ("Inexact backtrace:" );
306- }
307242 if (!stack ) {
308243 unsigned long dummy ;
309244 stack = & dummy ;
@@ -387,7 +322,6 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
387322 tinfo = current_thread_info ();
388323 HANDLE_STACK (valid_stack_ptr (tinfo , stack ));
389324#undef HANDLE_STACK
390- out :
391325 put_cpu ();
392326}
393327EXPORT_SYMBOL (dump_trace );
@@ -1188,21 +1122,3 @@ static int __init kstack_setup(char *s)
11881122 return 0 ;
11891123}
11901124early_param ("kstack" , kstack_setup );
1191-
1192- #ifdef CONFIG_STACK_UNWIND
1193- static int __init call_trace_setup (char * s )
1194- {
1195- if (!s )
1196- return - EINVAL ;
1197- if (strcmp (s , "old" ) == 0 )
1198- call_trace = -1 ;
1199- else if (strcmp (s , "both" ) == 0 )
1200- call_trace = 0 ;
1201- else if (strcmp (s , "newfallback" ) == 0 )
1202- call_trace = 1 ;
1203- else if (strcmp (s , "new" ) == 0 )
1204- call_trace = 2 ;
1205- return 0 ;
1206- }
1207- early_param ("call_trace" , call_trace_setup );
1208- #endif
0 commit comments