time.c (57b8628bb0ac4e47c806e45c5bbd89282e93869b) | time.c (bd0493eaaf5c7a1ea00786d46cc2f4af44e76f28) |
---|---|
1/* 2 * linux/arch/arm/kernel/time.c 3 * 4 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 5 * Modifications for ARM (C) 1994-2001 Russell King 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 96 unchanged lines hidden (view full) --- 105 do_leds(); 106 xtime_update(1); 107#ifndef CONFIG_SMP 108 update_process_times(user_mode(get_irq_regs())); 109#endif 110} 111#endif 112 | 1/* 2 * linux/arch/arm/kernel/time.c 3 * 4 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 5 * Modifications for ARM (C) 1994-2001 Russell King 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 96 unchanged lines hidden (view full) --- 105 do_leds(); 106 xtime_update(1); 107#ifndef CONFIG_SMP 108 update_process_times(user_mode(get_irq_regs())); 109#endif 110} 111#endif 112 |
113static void dummy_clock_access(struct timespec *ts) 114{ 115 ts->tv_sec = 0; 116 ts->tv_nsec = 0; 117} 118 119static clock_access_fn __read_persistent_clock = dummy_clock_access; 120static clock_access_fn __read_boot_clock = dummy_clock_access;; 121 122void read_persistent_clock(struct timespec *ts) 123{ 124 __read_persistent_clock(ts); 125} 126 127void read_boot_clock(struct timespec *ts) 128{ 129 __read_boot_clock(ts); 130} 131 132int __init register_persistent_clock(clock_access_fn read_boot, 133 clock_access_fn read_persistent) 134{ 135 /* Only allow the clockaccess functions to be registered once */ 136 if (__read_persistent_clock == dummy_clock_access && 137 __read_boot_clock == dummy_clock_access) { 138 if (read_boot) 139 __read_boot_clock = read_boot; 140 if (read_persistent) 141 __read_persistent_clock = read_persistent; 142 143 return 0; 144 } 145 146 return -EINVAL; 147} 148 |
|
113#if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS) 114static int timer_suspend(void) 115{ 116 if (system_timer->suspend) 117 system_timer->suspend(); 118 119 return 0; 120} --- 32 unchanged lines hidden --- | 149#if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS) 150static int timer_suspend(void) 151{ 152 if (system_timer->suspend) 153 system_timer->suspend(); 154 155 return 0; 156} --- 32 unchanged lines hidden --- |