clocksource.c (5d8b34fdcb384161552d01ee8f34af5ff11f9684) clocksource.c (79bf2bb335b85db25d27421c798595a2fa2a0e82)
1/*
2 * linux/kernel/time/clocksource.c
3 *
4 * This file contains the functions which manage clocksource drivers.
5 *
6 * Copyright (C) 2004, 2005 IBM, John Stultz (johnstul@us.ibm.com)
7 *
8 * This program is free software; you can redistribute it and/or modify

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

24 * o get rid of clocksource_jiffies extern
25 */
26
27#include <linux/clocksource.h>
28#include <linux/sysdev.h>
29#include <linux/init.h>
30#include <linux/module.h>
31#include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */
1/*
2 * linux/kernel/time/clocksource.c
3 *
4 * This file contains the functions which manage clocksource drivers.
5 *
6 * Copyright (C) 2004, 2005 IBM, John Stultz (johnstul@us.ibm.com)
7 *
8 * This program is free software; you can redistribute it and/or modify

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

24 * o get rid of clocksource_jiffies extern
25 */
26
27#include <linux/clocksource.h>
28#include <linux/sysdev.h>
29#include <linux/init.h>
30#include <linux/module.h>
31#include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */
32#include <linux/tick.h>
32
33/* XXX - Would like a better way for initializing curr_clocksource */
34extern struct clocksource clocksource_jiffies;
35
36/*[Clocksource internal variables]---------
37 * curr_clocksource:
38 * currently selected clocksource. Initialized to clocksource_jiffies.
39 * next_clocksource:

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

104
105 list_for_each_entry_safe(cs, tmp, &watchdog_list, wd_list) {
106 csnow = cs->read();
107 /* Initialized ? */
108 if (!(cs->flags & CLOCK_SOURCE_WATCHDOG)) {
109 if ((cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) &&
110 (watchdog->flags & CLOCK_SOURCE_IS_CONTINUOUS)) {
111 cs->flags |= CLOCK_SOURCE_VALID_FOR_HRES;
33
34/* XXX - Would like a better way for initializing curr_clocksource */
35extern struct clocksource clocksource_jiffies;
36
37/*[Clocksource internal variables]---------
38 * curr_clocksource:
39 * currently selected clocksource. Initialized to clocksource_jiffies.
40 * next_clocksource:

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

105
106 list_for_each_entry_safe(cs, tmp, &watchdog_list, wd_list) {
107 csnow = cs->read();
108 /* Initialized ? */
109 if (!(cs->flags & CLOCK_SOURCE_WATCHDOG)) {
110 if ((cs->flags & CLOCK_SOURCE_IS_CONTINUOUS) &&
111 (watchdog->flags & CLOCK_SOURCE_IS_CONTINUOUS)) {
112 cs->flags |= CLOCK_SOURCE_VALID_FOR_HRES;
113 /*
114 * We just marked the clocksource as
115 * highres-capable, notify the rest of the
116 * system as well so that we transition
117 * into high-res mode:
118 */
119 tick_clock_notify();
112 }
113 cs->flags |= CLOCK_SOURCE_WATCHDOG;
114 cs->wd_last = csnow;
115 } else {
116 cs_nsec = cyc2ns(cs, (csnow - cs->wd_last) & cs->mask);
117 cs->wd_last = csnow;
118 /* Check the delta. Might remove from the list ! */
119 clocksource_ratewd(cs, cs_nsec - wd_nsec);

--- 347 unchanged lines hidden ---
120 }
121 cs->flags |= CLOCK_SOURCE_WATCHDOG;
122 cs->wd_last = csnow;
123 } else {
124 cs_nsec = cyc2ns(cs, (csnow - cs->wd_last) & cs->mask);
125 cs->wd_last = csnow;
126 /* Check the delta. Might remove from the list ! */
127 clocksource_ratewd(cs, cs_nsec - wd_nsec);

--- 347 unchanged lines hidden ---