Deleted Added
full compact
generic_timer.c (299072) generic_timer.c (299851)
1/*-
2 * Copyright (c) 2011 The FreeBSD Foundation
3 * Copyright (c) 2013 Ruslan Bukin <br@bsdpad.com>
4 * All rights reserved.
5 *
6 * Based on mpcore_timer.c developed by Ben Gray <ben.r.gray@gmail.com>
7 *
8 * Redistribution and use in source and binary forms, with or without

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

33/**
34 * Cortex-A7, Cortex-A15, ARMv8 and later Generic Timer
35 */
36
37#include "opt_acpi.h"
38#include "opt_platform.h"
39
40#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2011 The FreeBSD Foundation
3 * Copyright (c) 2013 Ruslan Bukin <br@bsdpad.com>
4 * All rights reserved.
5 *
6 * Based on mpcore_timer.c developed by Ben Gray <ben.r.gray@gmail.com>
7 *
8 * Redistribution and use in source and binary forms, with or without

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

33/**
34 * Cortex-A7, Cortex-A15, ARMv8 and later Generic Timer
35 */
36
37#include "opt_acpi.h"
38#include "opt_platform.h"
39
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD: head/sys/arm/arm/generic_timer.c 299072 2016-05-04 16:15:39Z bz $");
41__FBSDID("$FreeBSD: head/sys/arm/arm/generic_timer.c 299851 2016-05-15 13:20:59Z manu $");
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/bus.h>
46#include <sys/kernel.h>
47#include <sys/module.h>
48#include <sys/malloc.h>
49#include <sys/rman.h>

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

209 set_el1(cntkctl, cntkctl);
210 isb();
211}
212
213static void
214tmr_setup_user_access(void *arg __unused)
215{
216
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/bus.h>
46#include <sys/kernel.h>
47#include <sys/module.h>
48#include <sys/malloc.h>
49#include <sys/rman.h>

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

209 set_el1(cntkctl, cntkctl);
210 isb();
211}
212
213static void
214tmr_setup_user_access(void *arg __unused)
215{
216
217 smp_rendezvous(NULL, setup_user_access, NULL, NULL);
217 if (arm_tmr_sc != NULL)
218 smp_rendezvous(NULL, setup_user_access, NULL, NULL);
218}
219SYSINIT(tmr_ua, SI_SUB_SMP, SI_ORDER_SECOND, tmr_setup_user_access, NULL);
220
221static unsigned
222arm_tmr_get_timecount(struct timecounter *tc)
223{
224
225 return (get_cntxct(arm_tmr_sc->physical));

--- 315 unchanged lines hidden ---
219}
220SYSINIT(tmr_ua, SI_SUB_SMP, SI_ORDER_SECOND, tmr_setup_user_access, NULL);
221
222static unsigned
223arm_tmr_get_timecount(struct timecounter *tc)
224{
225
226 return (get_cntxct(arm_tmr_sc->physical));

--- 315 unchanged lines hidden ---