--- zzzz-none-000/linux-3.10.107/arch/arm64/kernel/time.c 2017-06-27 09:49:32.000000000 +0000
+++ scorpion-7490-727/linux-3.10.107/arch/arm64/kernel/time.c 2021-02-04 17:41:59.000000000 +0000
@@ -18,6 +18,7 @@
* along with this program. If not, see .
*/
+#include
#include
#include
#include
@@ -33,13 +34,14 @@
#include
#include
#include
+#include
+#include
#include
#include
#include
-#ifdef CONFIG_SMP
unsigned long profile_pc(struct pt_regs *regs)
{
struct stackframe frame;
@@ -59,28 +61,20 @@
return frame.pc;
}
EXPORT_SYMBOL(profile_pc);
-#endif
-
-static u64 sched_clock_mult __read_mostly;
-
-unsigned long long notrace sched_clock(void)
-{
- return arch_timer_read_counter() * sched_clock_mult;
-}
void __init time_init(void)
{
u32 arch_timer_rate;
- clocksource_of_init();
+ of_clk_init(NULL);
+ clocksource_probe();
+
+ tick_setup_hrtimer_broadcast();
arch_timer_rate = arch_timer_get_rate();
if (!arch_timer_rate)
panic("Unable to initialise architected timer.\n");
- /* Cache the sched_clock multiplier to save a divide in the hot path. */
- sched_clock_mult = NSEC_PER_SEC / arch_timer_rate;
-
/* Calibrate the delay loop directly */
lpj_fine = arch_timer_rate / HZ;
}