Deleted Added
full compact
pcrtc.c (147969) pcrtc.c (153666)
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz and Don Ahn.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * from: @(#)clock.c 7.2 (Berkeley) 5/12/91
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz and Don Ahn.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * from: @(#)clock.c 7.2 (Berkeley) 5/12/91
33 * $FreeBSD: head/sys/pc98/cbus/pcrtc.c 147969 2005-07-13 15:43:21Z jhb $
33 * $FreeBSD: head/sys/pc98/cbus/pcrtc.c 153666 2005-12-22 22:16:09Z jhb $
34 */
35
36/*
37 * Routines to handle clock hardware.
38 */
39
40/*
41 * inittodr, settodr and support routines written

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

144 0, /* no poll_pps */
145 ~0u, /* counter_mask */
146 0, /* frequency */
147 "i8254", /* name */
148 0 /* quality */
149};
150
151static void
34 */
35
36/*
37 * Routines to handle clock hardware.
38 */
39
40/*
41 * inittodr, settodr and support routines written

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

144 0, /* no poll_pps */
145 ~0u, /* counter_mask */
146 0, /* frequency */
147 "i8254", /* name */
148 0 /* quality */
149};
150
151static void
152clkintr(struct clockframe *frame)
152clkintr(struct trapframe *frame)
153{
154
155 if (timecounter->tc_get_timecount == i8254_get_timecount) {
156 mtx_lock_spin(&clock_lock);
157 if (i8254_ticked)
158 i8254_ticked = 0;
159 else {
160 i8254_offset += timer0_max_count;
161 i8254_lastcount = 0;
162 }
163 clkintr_pending = 0;
164 mtx_unlock_spin(&clock_lock);
165 }
153{
154
155 if (timecounter->tc_get_timecount == i8254_get_timecount) {
156 mtx_lock_spin(&clock_lock);
157 if (i8254_ticked)
158 i8254_ticked = 0;
159 else {
160 i8254_offset += timer0_max_count;
161 i8254_lastcount = 0;
162 }
163 clkintr_pending = 0;
164 mtx_unlock_spin(&clock_lock);
165 }
166 if (!using_lapic_timer)
167 hardclock(frame);
166 KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer"));
167 hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
168}
169
170int
171acquire_timer1(int mode)
172{
173
174 if (timer1_state != RELEASED)
175 return (-1);

--- 729 unchanged lines hidden ---
168}
169
170int
171acquire_timer1(int mode)
172{
173
174 if (timer1_state != RELEASED)
175 return (-1);

--- 729 unchanged lines hidden ---