WSL2-Linux-Kernel/arch/arc
Vineet Gupta d8005e6b95 ARC: Timers/counters/delay management
ARC700 includes 2 in-core 32bit timers TIMER0 and TIMER1.
Both have exactly same capabilies.

* programmable to count from TIMER<n>_CNT to TIMER<n>_LIMIT
* for count 0 and LIMIT ~1, provides a free-running counter by
    auto-wrapping when limit is reached.
* optionally interrupt when LIMIT is reached (oneshot event semantics)
* rearming the interrupt provides periodic semantics
* run at CPU clk

ARC Linux uses TIMER0 for clockevent (periodic/oneshot) and TIMER1 for
clocksource (free-running clock).

Newer cores provide RTSC insn which gives a 64bit cpu clk snapshot hence
is more apt for clocksource when available.

SMP poses a bit of challenge for global timekeeping clocksource /
sched_clock() backend:
 -TIMER1 based local clocks are out-of-sync hence can't be used
  (thus we default to jiffies based cs as well as sched_clock() one/both
  of which platform can override with it's specific hardware assist)
 -RTSC is only allowed in SMP if it's cross-core-sync (Kconfig glue
  ensures that) and thus usable for both requirements.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
2013-02-11 20:00:39 +05:30
..
boot ARC: Build system: Makefiles, Kconfig, Linker script 2013-02-11 20:00:25 +05:30
include/asm ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
kernel ARC: Timers/counters/delay management 2013-02-11 20:00:39 +05:30
lib ARC: String library 2013-02-11 20:00:35 +05:30
mm ARC: uaccess friends 2013-02-11 20:00:31 +05:30
plat-arcfpga ARC: Interrupt Handling 2013-02-11 20:00:37 +05:30
Kbuild ARC: Build system: Makefiles, Kconfig, Linker script 2013-02-11 20:00:25 +05:30
Kconfig ARC: Process-creation/scheduling/idle-loop 2013-02-11 20:00:38 +05:30
Kconfig.debug ARC: Build system: Makefiles, Kconfig, Linker script 2013-02-11 20:00:25 +05:30
Makefile ARC: Build system: Makefiles, Kconfig, Linker script 2013-02-11 20:00:25 +05:30