diff options
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r-- | arch/mips/kernel/process.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index d2112d3cf11..b30cb2573aa 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -103,7 +103,6 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) | |||
103 | __init_dsp(); | 103 | __init_dsp(); |
104 | regs->cp0_epc = pc; | 104 | regs->cp0_epc = pc; |
105 | regs->regs[29] = sp; | 105 | regs->regs[29] = sp; |
106 | current_thread_info()->addr_limit = USER_DS; | ||
107 | } | 106 | } |
108 | 107 | ||
109 | void exit_thread(void) | 108 | void exit_thread(void) |
@@ -373,18 +372,18 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
373 | 372 | ||
374 | 373 | ||
375 | #ifdef CONFIG_KALLSYMS | 374 | #ifdef CONFIG_KALLSYMS |
376 | /* used by show_backtrace() */ | 375 | /* generic stack unwinding function */ |
377 | unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, | 376 | unsigned long notrace unwind_stack_by_address(unsigned long stack_page, |
378 | unsigned long pc, unsigned long *ra) | 377 | unsigned long *sp, |
378 | unsigned long pc, | ||
379 | unsigned long *ra) | ||
379 | { | 380 | { |
380 | unsigned long stack_page; | ||
381 | struct mips_frame_info info; | 381 | struct mips_frame_info info; |
382 | unsigned long size, ofs; | 382 | unsigned long size, ofs; |
383 | int leaf; | 383 | int leaf; |
384 | extern void ret_from_irq(void); | 384 | extern void ret_from_irq(void); |
385 | extern void ret_from_exception(void); | 385 | extern void ret_from_exception(void); |
386 | 386 | ||
387 | stack_page = (unsigned long)task_stack_page(task); | ||
388 | if (!stack_page) | 387 | if (!stack_page) |
389 | return 0; | 388 | return 0; |
390 | 389 | ||
@@ -443,6 +442,15 @@ unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, | |||
443 | *ra = 0; | 442 | *ra = 0; |
444 | return __kernel_text_address(pc) ? pc : 0; | 443 | return __kernel_text_address(pc) ? pc : 0; |
445 | } | 444 | } |
445 | EXPORT_SYMBOL(unwind_stack_by_address); | ||
446 | |||
447 | /* used by show_backtrace() */ | ||
448 | unsigned long unwind_stack(struct task_struct *task, unsigned long *sp, | ||
449 | unsigned long pc, unsigned long *ra) | ||
450 | { | ||
451 | unsigned long stack_page = (unsigned long)task_stack_page(task); | ||
452 | return unwind_stack_by_address(stack_page, sp, pc, ra); | ||
453 | } | ||
446 | #endif | 454 | #endif |
447 | 455 | ||
448 | /* | 456 | /* |