freebsd-nq/sys/arm
Ian Lepore 928e4f221d Replace the hard-coded way-too-small minimum event timer period with a value
calculated at runtime based on how long it takes to set up an event in
hardware.  This fixes the intermittant 1-minute hang at boot on imx5
systems, and also the occasional oversleeping while running.  It doesn't
affect imx6 systems, which use different hardware for eventtimers.

It turns out that it usually takes about 30 timer ticks to set up the timer
compare register, and the old hard-coded minimum period was 10 ticks.  On
the rare occasions when a timeout event that short was set up, we'd miss
the event and have to wait about 64 seconds for counter rollover before
the compare interrupt would fire.

Instead of just hardcoding a new bigger value, the code now measures the
time it takes to do the register read/write sequence to set up the compare
register, scales it up by 1.5x to be safe, and calculates the minimum event
period from the result.  In the real world, the minimum period works out to
about 750 nanoseconds on imx5 hardware.
2017-03-19 21:53:12 +00:00
..
allwinner Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges 2017-03-07 22:42:44 +00:00
altera/socfpga Add FPGA manager driver for Intel Arria 10. 2017-03-03 14:19:37 +00:00
amlogic/aml8726 Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges 2017-03-07 22:42:44 +00:00
annapurna/alpine Remake support for SMP kernel on UP cpu: 2017-02-02 06:14:44 +00:00
arm Split overbloated machep.c to multiple files and do basic cleanup 2017-03-11 07:07:41 +00:00
at91 Split overbloated machep.c to multiple files and do basic cleanup 2017-03-11 07:07:41 +00:00
broadcom/bcm2835 Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges 2017-03-07 22:42:44 +00:00
cavium/cns11xx Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00
cloudabi32 Catch up with changes to structure member names. 2017-01-17 22:05:52 +00:00
conf Add INTRNG option to EFIKA_MX config, it is an imx5-based platform. 2017-03-19 18:38:08 +00:00
freescale Replace the hard-coded way-too-small minimum event timer period with a value 2017-03-19 21:53:12 +00:00
include Fix arm stack frame walking support: 2017-03-14 16:06:57 +00:00
lpc Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges 2017-03-07 22:42:44 +00:00
mv Remove code for Marvell SoCs that lack a kernel config. 2017-03-17 12:59:16 +00:00
nvidia Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridges 2017-03-07 22:42:44 +00:00
qemu Make the default FDT implementation of platform_mp_setmaxid use the cpu 2017-03-17 12:45:53 +00:00
rockchip Remake support for SMP kernel on UP cpu: 2017-02-02 06:14:44 +00:00
samsung/exynos Remake support for SMP kernel on UP cpu: 2017-02-02 06:14:44 +00:00
ti - Add support for eMMC "partitions". Besides the user data area, i. e. 2017-03-16 22:23:04 +00:00
versatile Convert PCIe Hot Plug to using pci_request_feature 2017-02-25 06:11:59 +00:00
xilinx Remake support for SMP kernel on UP cpu: 2017-02-02 06:14:44 +00:00
xscale Allow setting access-width for UART registers. 2017-02-27 20:08:42 +00:00