time.c (11e4afb49b7fa1fc8e1ffd850c1806dd86a08204) time.c (979f867191f80e74713394cf8c0a3c1b3662b648)
1/*
2 * linux/arch/alpha/kernel/time.c
3 *
4 * Copyright (C) 1991, 1992, 1995, 1999, 2000 Linus Torvalds
5 *
6 * This file contains the PC-specific time handling details:
7 * reading the RTC at bootup, etc..
8 * 1994-07-02 Alan Modra

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

36#include <linux/mm.h>
37#include <linux/delay.h>
38#include <linux/ioport.h>
39#include <linux/irq.h>
40#include <linux/interrupt.h>
41#include <linux/init.h>
42#include <linux/bcd.h>
43#include <linux/profile.h>
1/*
2 * linux/arch/alpha/kernel/time.c
3 *
4 * Copyright (C) 1991, 1992, 1995, 1999, 2000 Linus Torvalds
5 *
6 * This file contains the PC-specific time handling details:
7 * reading the RTC at bootup, etc..
8 * 1994-07-02 Alan Modra

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

36#include <linux/mm.h>
37#include <linux/delay.h>
38#include <linux/ioport.h>
39#include <linux/irq.h>
40#include <linux/interrupt.h>
41#include <linux/init.h>
42#include <linux/bcd.h>
43#include <linux/profile.h>
44#include <linux/perf_event.h>
44
45#include <asm/uaccess.h>
46#include <asm/io.h>
47#include <asm/hwrpb.h>
48#include <asm/8253pit.h>
49#include <asm/rtc.h>
50
51#include <linux/mc146818rtc.h>

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

77 /* ticks/cycle * 2^48 */
78 unsigned long scaled_ticks_per_cycle;
79 /* partial unused tick */
80 unsigned long partial_tick;
81} state;
82
83unsigned long est_cycle_freq;
84
45
46#include <asm/uaccess.h>
47#include <asm/io.h>
48#include <asm/hwrpb.h>
49#include <asm/8253pit.h>
50#include <asm/rtc.h>
51
52#include <linux/mc146818rtc.h>

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

78 /* ticks/cycle * 2^48 */
79 unsigned long scaled_ticks_per_cycle;
80 /* partial unused tick */
81 unsigned long partial_tick;
82} state;
83
84unsigned long est_cycle_freq;
85
86#ifdef CONFIG_PERF_EVENTS
85
87
88DEFINE_PER_CPU(u8, perf_event_pending);
89
90#define set_perf_event_pending_flag() __get_cpu_var(perf_event_pending) = 1
91#define test_perf_event_pending() __get_cpu_var(perf_event_pending)
92#define clear_perf_event_pending() __get_cpu_var(perf_event_pending) = 0
93
94void set_perf_event_pending(void)
95{
96 set_perf_event_pending_flag();
97}
98
99#else /* CONFIG_PERF_EVENTS */
100
101#define test_perf_event_pending() 0
102#define clear_perf_event_pending()
103
104#endif /* CONFIG_PERF_EVENTS */
105
106
86static inline __u32 rpcc(void)
87{
88 __u32 result;
89 asm volatile ("rpcc %0" : "=r"(result));
90 return result;
91}
92
93int update_persistent_clock(struct timespec now)

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

170
171 write_sequnlock(&xtime_lock);
172
173#ifndef CONFIG_SMP
174 while (nticks--)
175 update_process_times(user_mode(get_irq_regs()));
176#endif
177
107static inline __u32 rpcc(void)
108{
109 __u32 result;
110 asm volatile ("rpcc %0" : "=r"(result));
111 return result;
112}
113
114int update_persistent_clock(struct timespec now)

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

191
192 write_sequnlock(&xtime_lock);
193
194#ifndef CONFIG_SMP
195 while (nticks--)
196 update_process_times(user_mode(get_irq_regs()));
197#endif
198
199 if (test_perf_event_pending()) {
200 clear_perf_event_pending();
201 perf_event_do_pending();
202 }
203
178 return IRQ_HANDLED;
179}
180
181void __init
182common_init_rtc(void)
183{
184 unsigned char x;
185

--- 316 unchanged lines hidden ---
204 return IRQ_HANDLED;
205}
206
207void __init
208common_init_rtc(void)
209{
210 unsigned char x;
211

--- 316 unchanged lines hidden ---