x86, efi: Set runtime_version to the EFI spec revision
[linux/fpc-iii.git] / arch / arm64 / kernel / time.c
blob3b4b7258f492ba6808a276d857ebaca598d616bc
1 /*
2 * Based on arch/arm/kernel/time.c
4 * Copyright (C) 1991, 1992, 1995 Linus Torvalds
5 * Modifications for ARM (C) 1994-2001 Russell King
6 * Copyright (C) 2012 ARM Ltd.
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.
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.
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/>.
21 #include <linux/export.h>
22 #include <linux/kernel.h>
23 #include <linux/interrupt.h>
24 #include <linux/time.h>
25 #include <linux/init.h>
26 #include <linux/sched.h>
27 #include <linux/smp.h>
28 #include <linux/timex.h>
29 #include <linux/errno.h>
30 #include <linux/profile.h>
31 #include <linux/syscore_ops.h>
32 #include <linux/timer.h>
33 #include <linux/irq.h>
35 #include <clocksource/arm_generic.h>
37 #include <asm/thread_info.h>
38 #include <asm/stacktrace.h>
40 #ifdef CONFIG_SMP
41 unsigned long profile_pc(struct pt_regs *regs)
43 struct stackframe frame;
45 if (!in_lock_functions(regs->pc))
46 return regs->pc;
48 frame.fp = regs->regs[29];
49 frame.sp = regs->sp;
50 frame.pc = regs->pc;
51 do {
52 int ret = unwind_frame(&frame);
53 if (ret < 0)
54 return 0;
55 } while (in_lock_functions(frame.pc));
57 return frame.pc;
59 EXPORT_SYMBOL(profile_pc);
60 #endif
62 void __init time_init(void)
64 arm_generic_timer_init();