time_64.c (c25141062a82ae8bddced1b3ce2b57a1c0efabe0) time_64.c (9a08862a5d2e266ecea1865547463da2745fc687)
1// SPDX-License-Identifier: GPL-2.0
2/* time.c: UltraSparc timer and TOD clock support.
3 *
4 * Copyright (C) 1997, 2008 David S. Miller (davem@davemloft.net)
5 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
6 *
7 * Based largely on code which is:
8 *
9 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu)

--- 13 unchanged lines hidden (view full) ---

23#include <linux/ioport.h>
24#include <linux/mc146818rtc.h>
25#include <linux/delay.h>
26#include <linux/profile.h>
27#include <linux/bcd.h>
28#include <linux/jiffies.h>
29#include <linux/cpufreq.h>
30#include <linux/percpu.h>
1/* time.c: UltraSparc timer and TOD clock support.
2 *
3 * Copyright (C) 1997, 2008 David S. Miller (davem@davemloft.net)
4 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
5 *
6 * Based largely on code which is:
7 *
8 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu)

--- 13 unchanged lines hidden (view full) ---

22#include <linux/ioport.h>
23#include <linux/mc146818rtc.h>
24#include <linux/delay.h>
25#include <linux/profile.h>
26#include <linux/bcd.h>
27#include <linux/jiffies.h>
28#include <linux/cpufreq.h>
29#include <linux/percpu.h>
31#include <linux/miscdevice.h>
32#include <linux/rtc/m48t59.h>
33#include <linux/kernel_stat.h>
34#include <linux/clockchips.h>
35#include <linux/clocksource.h>
36#include <linux/platform_device.h>
37#include <linux/ftrace.h>
38
39#include <asm/oplib.h>

--- 9 unchanged lines hidden (view full) ---

49#include <asm/irq_regs.h>
50#include <asm/cacheflush.h>
51
52#include "entry.h"
53#include "kernel.h"
54
55DEFINE_SPINLOCK(rtc_lock);
56
30#include <linux/rtc/m48t59.h>
31#include <linux/kernel_stat.h>
32#include <linux/clockchips.h>
33#include <linux/clocksource.h>
34#include <linux/platform_device.h>
35#include <linux/ftrace.h>
36
37#include <asm/oplib.h>

--- 9 unchanged lines hidden (view full) ---

47#include <asm/irq_regs.h>
48#include <asm/cacheflush.h>
49
50#include "entry.h"
51#include "kernel.h"
52
53DEFINE_SPINLOCK(rtc_lock);
54
55unsigned int __read_mostly vdso_fix_stick;
56
57#ifdef CONFIG_SMP
58unsigned long profile_pc(struct pt_regs *regs)
59{
60 unsigned long pc = instruction_pointer(regs);
61
62 if (in_lock_functions(pc))
63 return regs->u_regs[UREG_RETPC];
64 return pc;

--- 761 unchanged lines hidden (view full) ---

826 ops->frequency = freq;
827 tick_operations = *ops;
828 get_tick_patch();
829}
830
831void __init time_init_early(void)
832{
833 if (tlb_type == spitfire) {
57#ifdef CONFIG_SMP
58unsigned long profile_pc(struct pt_regs *regs)
59{
60 unsigned long pc = instruction_pointer(regs);
61
62 if (in_lock_functions(pc))
63 return regs->u_regs[UREG_RETPC];
64 return pc;

--- 761 unchanged lines hidden (view full) ---

826 ops->frequency = freq;
827 tick_operations = *ops;
828 get_tick_patch();
829}
830
831void __init time_init_early(void)
832{
833 if (tlb_type == spitfire) {
834 if (is_hummingbird())
834 if (is_hummingbird()) {
835 init_tick_ops(&hbtick_operations);
835 init_tick_ops(&hbtick_operations);
836 else
836 clocksource_tick.archdata.vclock_mode = VCLOCK_NONE;
837 } else {
837 init_tick_ops(&tick_operations);
838 init_tick_ops(&tick_operations);
839 clocksource_tick.archdata.vclock_mode = VCLOCK_TICK;
840 vdso_fix_stick = 1;
841 }
838 } else {
839 init_tick_ops(&stick_operations);
842 } else {
843 init_tick_ops(&stick_operations);
844 clocksource_tick.archdata.vclock_mode = VCLOCK_STICK;
840 }
841}
842
843void __init time_init(void)
844{
845 unsigned long freq;
846
847 freq = tick_operations.frequency;

--- 45 unchanged lines hidden ---
845 }
846}
847
848void __init time_init(void)
849{
850 unsigned long freq;
851
852 freq = tick_operations.frequency;

--- 45 unchanged lines hidden ---