--- zzzz-none-000/linux-3.10.107/arch/mips/kernel/process.c 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/arch/mips/kernel/process.c 2021-11-10 11:53:54.000000000 +0000 @@ -42,6 +42,9 @@ #include #include +/*--- #define STACK_TRC(args...) printk(KERN_INFO args) ---*/ +#define STACK_TRC(args...) + #ifdef CONFIG_HOTPLUG_CPU void arch_cpu_idle_dead(void) { @@ -60,9 +63,6 @@ /* New thread loses kernel privileges. */ status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK); -#ifdef CONFIG_64BIT - status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR; -#endif status |= KU_USER; regs->cp0_status = status; clear_used_math(); @@ -475,7 +475,7 @@ * thread_saved_pc() and get_wchan() are not reliable. */ if (schedule_mfi.pc_offset < 0) - printk("Can't analyze schedule() prologue at %p\n", schedule); + printk(KERN_WARNING "Can't analyze schedule() prologue at %p\n", schedule); return 0; } @@ -562,11 +562,14 @@ * same value. */ pc = pc != *ra ? *ra : 0; - else + else { pc = ((unsigned long *)(*sp))[info.pc_offset]; + STACK_TRC("%s %d: pc %lx pc_offset = %d\n", __FUNCTION__, __LINE__, pc, info.pc_offset); + } *sp += info.frame_size; *ra = 0; + STACK_TRC("%s %d: %lx %d\n", __FUNCTION__, __LINE__, pc, __kernel_text_address(pc)); return __kernel_text_address(pc) ? pc : 0; } EXPORT_SYMBOL(unwind_stack_by_address);