sparc64: pull retry logic out of tickcmpr_set(), sys_tickcmpr_set()
authorcheloha <cheloha@openbsd.org>
Thu, 29 Dec 2022 22:44:23 +0000 (22:44 +0000)
committercheloha <cheloha@openbsd.org>
Thu, 29 Dec 2022 22:44:23 +0000 (22:44 +0000)
commit4b28d16fd8eba68de6f243d154fd4844a1d6674b
tree48cbea64788080ba0cf03bddd62ff5033d44b08c
parentc6206b646fffcddb1811a205585c55bd32f8dbc1
sparc64: pull retry logic out of tickcmpr_set(), sys_tickcmpr_set()

Pull the retry logic out of tickcmpr_set() and sys_tickcmpr_set() into
C functions tick_rearm() and sys_tick_rearm(), respectively.  There is
nothing wrong with the retry logic in these assembly functions, but
it's better to keep equivalent code similar and this change realigns
the %TICK and %SYS_TICK rearm code with that of the Hummingbird
%STICK.

Tested by miod@ on UltraSPARC I, UltraSPARC II, and UltraSPARC IIe.

Link: https://marc.info/?l=openbsd-tech&m=167175014315419&w=2
ok kettenis@
sys/arch/sparc64/sparc64/clock.c
sys/arch/sparc64/sparc64/locore.s