Index: sys/arm/arm/machdep.c =================================================================== --- sys/arm/arm/machdep.c +++ sys/arm/arm/machdep.c @@ -48,7 +48,6 @@ #include "opt_kstack_pages.h" #include "opt_platform.h" #include "opt_sched.h" -#include "opt_timer.h" #include __FBSDID("$FreeBSD$"); @@ -304,16 +303,12 @@ CTR2(KTR_SPARE2, "cpu_idle(%d) at %d", busy, curcpu); spinlock_enter(); -#ifndef NO_EVENTTIMERS if (!busy) cpu_idleclock(); -#endif if (!sched_runnable()) cpu_sleep(0); -#ifndef NO_EVENTTIMERS if (!busy) cpu_activeclock(); -#endif spinlock_exit(); CTR2(KTR_SPARE2, "cpu_idle(%d) at %d done", busy, curcpu); } @@ -325,21 +320,6 @@ return (0); } -#ifdef NO_EVENTTIMERS -/* - * Most ARM platforms don't need to do anything special to init their clocks - * (they get intialized during normal device attachment), and by not defining a - * cpu_initclocks() function they get this generic one. Any platform that needs - * to do something special can just provide their own implementation, which will - * override this one due to the weak linkage. - */ -void -arm_generic_initclocks(void) -{ -} -__weak_reference(arm_generic_initclocks, cpu_initclocks); - -#else void cpu_initclocks(void) { @@ -353,7 +333,6 @@ cpu_initclocks_bsp(); #endif } -#endif #ifdef PLATFORM void Index: sys/arm/include/machdep.h =================================================================== --- sys/arm/include/machdep.h +++ sys/arm/include/machdep.h @@ -39,7 +39,6 @@ void arm_parse_fdt_bootargs(void); void arm_print_kenv(void); -void arm_generic_initclocks(void); int arm_get_vfpstate(struct thread *td, void *args); /* Board-specific attributes */ Index: sys/conf/options =================================================================== --- sys/conf/options +++ sys/conf/options @@ -180,7 +180,6 @@ NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h NO_ADAPTIVE_RWLOCKS NO_ADAPTIVE_SX -NO_EVENTTIMERS opt_timer.h NO_OBSOLETE_CODE opt_global.h NO_SYSCTL_DESCR opt_global.h NSWBUF_MIN opt_param.h Index: sys/conf/options.arm =================================================================== --- sys/conf/options.arm +++ sys/conf/options.arm @@ -6,7 +6,6 @@ ARM_L2_PIPT opt_global.h ARM_MANY_BOARD opt_global.h ARM_WANT_TP_ADDRESS opt_global.h -COUNTS_PER_SEC opt_timer.h CPSW_ETHERSWITCH opt_cpsw.h CPU_ARM9E opt_global.h CPU_ARM1176 opt_global.h @@ -61,7 +60,6 @@ SOC_TI_AM335X opt_global.h SOC_TEGRA2 opt_global.h XSCALE_CACHE_READ_WRITE_ALLOCATE opt_global.h -XSACLE_DISABLE_CCNT opt_timer.h VERBOSE_INIT_ARM opt_global.h VM_MAXUSER_ADDRESS opt_global.h GFB_DEBUG opt_gfb.h Index: sys/kern/kern_et.c =================================================================== --- sys/kern/kern_et.c +++ sys/kern/kern_et.c @@ -37,8 +37,6 @@ #include #include -#include "opt_timer.h" - SLIST_HEAD(et_eventtimers_list, eventtimer); static struct et_eventtimers_list eventtimers = SLIST_HEAD_INITIALIZER(et_eventtimers); @@ -130,9 +128,7 @@ et_change_frequency(struct eventtimer *et, uint64_t newfreq) { -#ifndef NO_EVENTTIMERS cpu_et_frequency(et, newfreq); -#endif } /* Index: sys/kern/kern_timeout.c =================================================================== --- sys/kern/kern_timeout.c +++ sys/kern/kern_timeout.c @@ -41,9 +41,6 @@ #include "opt_callout_profiling.h" #include "opt_ddb.h" -#if defined(__arm__) -#include "opt_timer.h" -#endif #include "opt_rss.h" #include @@ -74,9 +71,7 @@ #include #endif -#ifndef NO_EVENTTIMERS DPCPU_DECLARE(sbintime_t, hardclocktime); -#endif SDT_PROVIDER_DEFINE(callout_execute); SDT_PROBE_DEFINE1(callout_execute, , , callout__start, "struct callout *"); @@ -527,15 +522,14 @@ */ } while (((int)(firstb - lastb)) <= 0); cc->cc_firstevent = last; -#ifndef NO_EVENTTIMERS cpu_new_callout(curcpu, last, first); -#endif + CC_UNLOCK_FLAGS(cc, MTX_QUIET); + #ifdef CALLOUT_PROFILING avg_depth_dir += (depth_dir * 1000 - avg_depth_dir) >> 8; avg_mpcalls_dir += (mpcalls_dir * 1000 - avg_mpcalls_dir) >> 8; avg_lockcalls_dir += (lockcalls_dir * 1000 - avg_lockcalls_dir) >> 8; #endif - CC_UNLOCK_FLAGS(cc, MTX_QUIET); /* * swi_sched acquires the thread lock, so we don't want to call it @@ -612,7 +606,7 @@ LIST_INSERT_HEAD(&cc->cc_callwheel[bucket], c, c_links.le); if (cc->cc_bucket == bucket) cc_exec_next(cc) = c; -#ifndef NO_EVENTTIMERS + /* * Inform the eventtimers(4) subsystem there's a new callout * that has been inserted, but only if really required. @@ -624,7 +618,6 @@ cc->cc_firstevent = sbt; cpu_new_callout(cpu, sbt, c->c_time); } -#endif } static void @@ -868,15 +861,7 @@ } if ((flags & C_HARDCLOCK) != 0 && sbt < tick_sbt) sbt = tick_sbt; - if ((flags & C_HARDCLOCK) != 0 || -#ifdef NO_EVENTTIMERS - sbt >= sbt_timethreshold) { - to_sbt = getsbinuptime(); - - /* Add safety belt for the case of hz > 1000. */ - to_sbt += tc_tick_sbt - tick_sbt; -#else - sbt >= sbt_tickthreshold) { + if ((flags & C_HARDCLOCK) != 0 || sbt >= sbt_tickthreshold) { /* * Obtain the time of the last hardclock() call on * this CPU directly from the kern_clocksource.c. @@ -889,7 +874,6 @@ spinlock_enter(); to_sbt = DPCPU_GET(hardclocktime); spinlock_exit(); -#endif #endif if (cold && to_sbt == 0) to_sbt = sbinuptime();