traps.c (2c55d703391acf7e9101da596d0c15ee03b318a3) | traps.c (c5ac25e0d78a6f63446b8fef4d8630ccd7a2663d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Author: Huacai Chen <chenhuacai@loongson.cn> 4 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited 5 */ 6#include <linux/bitops.h> 7#include <linux/bug.h> 8#include <linux/compiler.h> --- 58 unchanged lines hidden (view full) --- 67{ 68 unsigned long addr; 69 struct unwind_state state; 70 struct pt_regs *pregs = (struct pt_regs *)regs; 71 72 if (!task) 73 task = current; 74 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Author: Huacai Chen <chenhuacai@loongson.cn> 4 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited 5 */ 6#include <linux/bitops.h> 7#include <linux/bug.h> 8#include <linux/compiler.h> --- 58 unchanged lines hidden (view full) --- 67{ 68 unsigned long addr; 69 struct unwind_state state; 70 struct pt_regs *pregs = (struct pt_regs *)regs; 71 72 if (!task) 73 task = current; 74 |
75 if (user_mode(regs)) 76 state.type = UNWINDER_GUESS; 77 | |
78 printk("%sCall Trace:", loglvl); 79 for (unwind_start(&state, task, pregs); 80 !unwind_done(&state); unwind_next_frame(&state)) { 81 addr = unwind_get_return_address(&state); 82 print_ip_sym(loglvl, addr); 83 } 84 printk("%s\n", loglvl); 85} --- 680 unchanged lines hidden --- | 75 printk("%sCall Trace:", loglvl); 76 for (unwind_start(&state, task, pregs); 77 !unwind_done(&state); unwind_next_frame(&state)) { 78 addr = unwind_get_return_address(&state); 79 print_ip_sym(loglvl, addr); 80 } 81 printk("%s\n", loglvl); 82} --- 680 unchanged lines hidden --- |