kern_clocksource.c (215317) | kern_clocksource.c (215701) |
---|---|
1/*- 2 * Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/kern/kern_clocksource.c 215317 2010-11-14 20:38:11Z dim $"); | 28__FBSDID("$FreeBSD: head/sys/kern/kern_clocksource.c 215701 2010-11-22 19:32:54Z dim $"); |
29 30/* 31 * Common routines to manage event timers hardware. 32 */ 33 34/* XEN has own timer routines now. */ 35#ifndef XEN 36 --- 93 unchanged lines hidden (view full) --- 130 struct bintime nexttick; /* Next timer tick time. */ 131 struct bintime nexthard; /* Next hardlock() event. */ 132 struct bintime nextstat; /* Next statclock() event. */ 133 struct bintime nextprof; /* Next profclock() event. */ 134 int ipi; /* This CPU needs IPI. */ 135 int idle; /* This CPU is in idle mode. */ 136}; 137 | 29 30/* 31 * Common routines to manage event timers hardware. 32 */ 33 34/* XEN has own timer routines now. */ 35#ifndef XEN 36 --- 93 unchanged lines hidden (view full) --- 130 struct bintime nexttick; /* Next timer tick time. */ 131 struct bintime nexthard; /* Next hardlock() event. */ 132 struct bintime nextstat; /* Next statclock() event. */ 133 struct bintime nextprof; /* Next profclock() event. */ 134 int ipi; /* This CPU needs IPI. */ 135 int idle; /* This CPU is in idle mode. */ 136}; 137 |
138STATIC_DPCPU_DEFINE(struct pcpu_state, timerstate); | 138static DPCPU_DEFINE(struct pcpu_state, timerstate); |
139 140#define FREQ2BT(freq, bt) \ 141{ \ 142 (bt)->sec = 0; \ 143 (bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \ 144} 145#define BT2FREQ(bt) \ 146 (((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \ --- 757 unchanged lines hidden --- | 139 140#define FREQ2BT(freq, bt) \ 141{ \ 142 (bt)->sec = 0; \ 143 (bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \ 144} 145#define BT2FREQ(bt) \ 146 (((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \ --- 757 unchanged lines hidden --- |