hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/arm64/kernel/time.c
....@@ -1,21 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Based on arch/arm/kernel/time.c
34 *
45 * Copyright (C) 1991, 1992, 1995 Linus Torvalds
56 * Modifications for ARM (C) 1994-2001 Russell King
67 * 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/>.
198 */
209
2110 #include <linux/clockchips.h>
....@@ -34,13 +23,14 @@
3423 #include <linux/irq.h>
3524 #include <linux/delay.h>
3625 #include <linux/clocksource.h>
37
-#include <linux/clk-provider.h>
26
+#include <linux/of_clk.h>
3827 #include <linux/acpi.h>
3928
4029 #include <clocksource/arm_arch_timer.h>
4130
4231 #include <asm/thread_info.h>
4332 #include <asm/stacktrace.h>
33
+#include <asm/paravirt.h>
4434
4535 unsigned long profile_pc(struct pt_regs *regs)
4636 {
....@@ -49,11 +39,8 @@
4939 if (!in_lock_functions(regs->pc))
5040 return regs->pc;
5141
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
+
5744 do {
5845 int ret = unwind_frame(NULL, &frame);
5946 if (ret < 0)
....@@ -79,4 +66,6 @@
7966
8067 /* Calibrate the delay loop directly */
8168 lpj_fine = arch_timer_rate / HZ;
69
+
70
+ pv_time_init();
8271 }