qemu-e2k/hw/m68k
Peter Maydell b01422622b ptimer: Rename ptimer_init() to ptimer_init_with_bh()
Currently the ptimer design uses a QEMU bottom-half as its
mechanism for calling back into the device model using the
ptimer when the timer has expired. Unfortunately this design
is fatally flawed, because it means that there is a lag
between the ptimer updating its own state and the device
callback function updating device state, and guest accesses
to device registers between the two can return inconsistent
device state.

We want to replace the bottom-half design with one where
the guest device's callback is called either immediately
(when the ptimer triggers by timeout) or when the device
model code closes a transaction-begin/end section (when the
ptimer triggers because the device model changed the
ptimer's count value or other state). As the first step,
rename ptimer_init() to ptimer_init_with_bh(), to free up
the ptimer_init() name for the new API. We can then convert
all the ptimer users away from ptimer_init_with_bh() before
removing it entirely.

(Commit created with
 git grep -l ptimer_init | xargs sed -i -e 's/ptimer_init/ptimer_init_with_bh/'
and three overlong lines folded by hand.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20191008171740.9679-2-peter.maydell@linaro.org
2019-10-15 18:09:02 +01:00
..
an5206.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
Kconfig m68k: Add serial controller to the NeXTcube machine 2019-09-07 08:32:34 +02:00
Makefile.objs m68k: Add NeXTcube machine 2019-09-07 08:31:51 +02:00
mcf5206.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
mcf5208.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
mcf_intc.c Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
next-cube.c hw/m68k/next-cube: Avoid static RTC variables and introduce control register 2019-10-01 11:42:27 +02:00
next-kbd.c m68k: Add NeXTcube keyboard device 2019-09-07 08:31:33 +02:00