qemu/hw/timer
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
..
a9gtimer.c hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
allwinner-a10-pit.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
altera_timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
arm_mptimer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
arm_timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
armv7m_systick.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
aspeed_rtc.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
aspeed_timer.c aspeed/scu: Introduce a aspeed_scu_get_apb_freq() routine 2019-09-13 16:05:01 +01:00
cadence_ttc.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
cmsdk-apb-dualtimer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
cmsdk-apb-timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
digic-timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
ds1338.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
etraxfs_timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
exynos4210_mct.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
exynos4210_pwm.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
exynos4210_rtc.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
grlib_gptimer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
hpet.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
i8254_common.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
i8254.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
imx_epit.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
imx_gpt.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
Kconfig hw/Kconfig: Move the generic XLNX_ZYNQMP to the root hw/Kconfig 2019-08-19 21:28:25 +02:00
lm32_timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
m41t80.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
m48t59-internal.h Normalize header guard symbol definition. 2019-05-13 08:58:55 +02:00
m48t59-isa.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
m48t59.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
Makefile.objs hw: timer: Add ASPEED RTC device 2019-07-01 17:28:59 +01:00
mc146818rtc.c mc146818rtc: Remove reset notifiers 2019-08-20 17:26:20 +02:00
milkymist-sysctl.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
mips_gictimer.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
mss-timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
nrf51_timer.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
omap_gptimer.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
omap_synctimer.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
pl031.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
puv3_ost.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
pxa2xx_timer.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
sh_timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
slavio_timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
stm32f2xx_timer.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
sun4v-rtc.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
trace-events hw: timer: Add ASPEED RTC device 2019-07-01 17:28:59 +01:00
twl92230.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
xilinx_timer.c ptimer: Rename ptimer_init() to ptimer_init_with_bh() 2019-10-15 18:09:02 +01:00
xlnx-zynqmp-rtc.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00