Deleted Added
full compact
tick.c (215317) tick.c (215701)
1/*-
2 * Copyright (c) 2006-2007 Bruce M. Simpson.
3 * Copyright (c) 2003-2004 Juli Mallett.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 */
27
28/*
29 * Simple driver for the 32-bit interval counter built in to all
30 * MIPS32 CPUs.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006-2007 Bruce M. Simpson.
3 * Copyright (c) 2003-2004 Juli Mallett.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 */
27
28/*
29 * Simple driver for the 32-bit interval counter built in to all
30 * MIPS32 CPUs.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/mips/mips/tick.c 215317 2010-11-14 20:38:11Z dim $");
34__FBSDID("$FreeBSD: head/sys/mips/mips/tick.c 215701 2010-11-22 19:32:54Z dim $");
35
36#include "opt_cputype.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/sysctl.h>
41#include <sys/bus.h>
42#include <sys/kernel.h>

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

52#include <machine/clock.h>
53#include <machine/locore.h>
54#include <machine/md_var.h>
55
56uint64_t counter_freq;
57
58struct timecounter *platform_timecounter;
59
35
36#include "opt_cputype.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/sysctl.h>
41#include <sys/bus.h>
42#include <sys/kernel.h>

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

52#include <machine/clock.h>
53#include <machine/locore.h>
54#include <machine/md_var.h>
55
56uint64_t counter_freq;
57
58struct timecounter *platform_timecounter;
59
60STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick);
60static DPCPU_DEFINE(uint32_t, cycles_per_tick);
61static uint32_t cycles_per_usec;
62
61static uint32_t cycles_per_usec;
62
63STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper);
64STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last);
65STATIC_DPCPU_DEFINE(uint32_t, compare_ticks);
66STATIC_DPCPU_DEFINE(uint32_t, lost_ticks);
63static DPCPU_DEFINE(volatile uint32_t, counter_upper);
64static DPCPU_DEFINE(volatile uint32_t, counter_lower_last);
65static DPCPU_DEFINE(uint32_t, compare_ticks);
66static DPCPU_DEFINE(uint32_t, lost_ticks);
67
68struct clock_softc {
69 int intr_rid;
70 struct resource *intr_res;
71 void *intr_handler;
72 struct timecounter tc;
73 struct eventtimer et;
74};

--- 323 unchanged lines hidden ---
67
68struct clock_softc {
69 int intr_rid;
70 struct resource *intr_res;
71 void *intr_handler;
72 struct timecounter tc;
73 struct eventtimer et;
74};

--- 323 unchanged lines hidden ---