zephyr/drivers
Andy Ross 0f444c84e5 drivers/timer: Add a standard workaround for known qemu issues
Qemu doesn't like tickless.  By default[1] it tries to be realtime as
vied by the host CPU -- presenting read values from hardware cycle
counters and interrupt timings at the appropriate real world clock
times according to whatever the simulated counter frequency is.  But
when the host system is loaded, there is always the problem that the
qemu process might not see physical CPU time for large chunks of time
(i.e. a host OS scheduling quantum -- generally about the same size as
guest ticks!) leading to lost cycles.

When those timer interrupts are delivered by the emulated hardware at
fixed frequencies without software intervention, that's not so bad:
the work the guest has to do after the interrupt generally happens
synchronously (because the qemu process has just started running) and
nothing notices the dropout.

But with tickless, the interrupts need to be explicitly programmed by
guest software!  That means the driver needs to be sure it's going to
get some real CPU time within some small fraction of a Zephyr tick of
the right time, otherwise the computations get wonky.

The end result is that qemu tends to work with tickless well on an
unloaded/idle run, but not in situations (like sanitycheck) where it
needs to content with other processes for host CPU.

So, add a flag that drivers can use to "fake" tickless behavior when
run under qemu (only), and enable it (only!) for the small handful of
tests that are having trouble.

[1] There is an -icount feature to implement proper cycle counting at
the expense of real-world-time correspondence.  Maybe someday we might
get it to work for us.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-11-13 17:10:07 -05:00
..
adc dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
aio drivers: Remove board.h include 2018-11-01 13:21:11 -04:00
audio dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
bluetooth drivers: Remove board.h include 2018-11-01 13:21:11 -04:00
can dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
clock_control dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
console drivers: Remove board.h include 2018-11-01 13:21:11 -04:00
counter dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
crypto drivers: crypto: Fix precedence issue in if statement 2018-10-25 07:23:49 +01:00
display dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
dma logging: Fix errors in log usage 2018-11-10 12:38:29 -05:00
entropy arm: kinetis: Add basic DTS support for TRNG 2018-11-06 08:49:50 -06:00
ethernet dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
flash dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
gpio dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
i2c dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
i2s dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
ieee802154 drivers: ieee802154: Fix log configuration in kconfig 2018-11-10 12:38:29 -05:00
interrupt_controller dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
ipm dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
led driver: led: move to new logger 2018-10-10 10:22:01 -04:00
led_strip drivers: Remove board.h include 2018-11-01 13:21:11 -04:00
modem dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
net net: qemu: Allow SLIP or normal ethernet connectivity 2018-11-10 09:13:45 -05:00
neural_net dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
pci shell: add PCI shell 2018-11-05 09:32:38 -05:00
pinmux dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
ptp_clock
pwm dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
rtc dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
sensor dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
serial dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
spi dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
timer drivers/timer: Add a standard workaround for known qemu issues 2018-11-13 17:10:07 -05:00
usb dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
watchdog dts_fixups: Use DT_ prefix in all defined labels not related to Kconfig 2018-11-13 10:44:42 -06:00
wifi wifi: winc1500: Add Device Tree support 2018-11-13 14:12:18 -05:00
CMakeLists.txt drivers: neural_net: Use correct Kconfig variable 2018-11-09 16:52:32 -05:00
Kconfig kconfig: intel_s1000: Add neural_net Kconfig 2018-11-08 17:08:19 -05:00