powerpc64: trigger deferred DEC interrupts from splx(9)
authorcheloha <cheloha@openbsd.org>
Tue, 9 Aug 2022 04:40:08 +0000 (04:40 +0000)
committercheloha <cheloha@openbsd.org>
Tue, 9 Aug 2022 04:40:08 +0000 (04:40 +0000)
commitf27ca60c2fcbf90cdebcf57245e97d9e6d6421bf
tree8bd64dfad39cacd19b826d28cb18ef7d68004359
parentfbf56d00108c5be48c4a817cc7e9476f1835bb7d
powerpc64: trigger deferred DEC interrupts from splx(9)

In order to move to a machine-independent clock interrupt subsystem,
the powerpc64 clock interrupt code needs to work without knowing
anything about the clock interrupt schedule.

The easiest way to do this is, if the DEC fires while the CPU's IPL is
at or above IPL_CLOCK, to postpone clock interrupt work until the
clock interrupt is logically unmasked from splx(9).

Because we no longer defer work until the next tick, we don't need to
keep track of pending statclock ticks in the cpu_info struct.

With input from kettenis@.

Graciously compiled and tested by gkoehler@ and kettenis@.

Link: https://marc.info/?l=openbsd-tech&m=165862522102767&w=2
ok kettenis@ gkoehler@.
sys/arch/powerpc64/include/cpu.h
sys/arch/powerpc64/powerpc64/clock.c
sys/arch/powerpc64/powerpc64/intr.c