| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Based on arch/arm/kernel/time.c |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 1991, 1992, 1995 Linus Torvalds |
|---|
| 5 | 6 | * Modifications for ARM (C) 1994-2001 Russell King |
|---|
| 6 | 7 | * Copyright (C) 2012 ARM Ltd. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 10 | | - * published by the Free Software Foundation. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | | - * |
|---|
| 17 | | - * You should have received a copy of the GNU General Public License |
|---|
| 18 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 19 | 8 | */ |
|---|
| 20 | 9 | |
|---|
| 21 | 10 | #include <linux/clockchips.h> |
|---|
| .. | .. |
|---|
| 34 | 23 | #include <linux/irq.h> |
|---|
| 35 | 24 | #include <linux/delay.h> |
|---|
| 36 | 25 | #include <linux/clocksource.h> |
|---|
| 37 | | -#include <linux/clk-provider.h> |
|---|
| 26 | +#include <linux/of_clk.h> |
|---|
| 38 | 27 | #include <linux/acpi.h> |
|---|
| 39 | 28 | |
|---|
| 40 | 29 | #include <clocksource/arm_arch_timer.h> |
|---|
| 41 | 30 | |
|---|
| 42 | 31 | #include <asm/thread_info.h> |
|---|
| 43 | 32 | #include <asm/stacktrace.h> |
|---|
| 33 | +#include <asm/paravirt.h> |
|---|
| 44 | 34 | |
|---|
| 45 | 35 | unsigned long profile_pc(struct pt_regs *regs) |
|---|
| 46 | 36 | { |
|---|
| .. | .. |
|---|
| 49 | 39 | if (!in_lock_functions(regs->pc)) |
|---|
| 50 | 40 | return regs->pc; |
|---|
| 51 | 41 | |
|---|
| 52 | | - frame.fp = regs->regs[29]; |
|---|
| 53 | | - frame.pc = regs->pc; |
|---|
| 54 | | -#ifdef CONFIG_FUNCTION_GRAPH_TRACER |
|---|
| 55 | | - frame.graph = current->curr_ret_stack; |
|---|
| 56 | | -#endif |
|---|
| 42 | + start_backtrace(&frame, regs->regs[29], regs->pc); |
|---|
| 43 | + |
|---|
| 57 | 44 | do { |
|---|
| 58 | 45 | int ret = unwind_frame(NULL, &frame); |
|---|
| 59 | 46 | if (ret < 0) |
|---|
| .. | .. |
|---|
| 79 | 66 | |
|---|
| 80 | 67 | /* Calibrate the delay loop directly */ |
|---|
| 81 | 68 | lpj_fine = arch_timer_rate / HZ; |
|---|
| 69 | + |
|---|
| 70 | + pv_time_init(); |
|---|
| 82 | 71 | } |
|---|