mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
fe10ab540b
commit
bc72ad6754
121 changed files with 678 additions and 678 deletions
|
@ -1348,7 +1348,7 @@ static uint32_t ppc4xx_gpt_readl (void *opaque, hwaddr addr)
|
|||
switch (addr) {
|
||||
case 0x00:
|
||||
/* Time base counter */
|
||||
ret = muldiv64(qemu_get_clock_ns(vm_clock) + gpt->tb_offset,
|
||||
ret = muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + gpt->tb_offset,
|
||||
gpt->tb_freq, get_ticks_per_sec());
|
||||
break;
|
||||
case 0x10:
|
||||
|
@ -1405,7 +1405,7 @@ static void ppc4xx_gpt_writel (void *opaque,
|
|||
case 0x00:
|
||||
/* Time base counter */
|
||||
gpt->tb_offset = muldiv64(value, get_ticks_per_sec(), gpt->tb_freq)
|
||||
- qemu_get_clock_ns(vm_clock);
|
||||
- qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
|
||||
ppc4xx_gpt_compute_timer(gpt);
|
||||
break;
|
||||
case 0x10:
|
||||
|
@ -1476,7 +1476,7 @@ static void ppc4xx_gpt_reset (void *opaque)
|
|||
int i;
|
||||
|
||||
gpt = opaque;
|
||||
qemu_del_timer(gpt->timer);
|
||||
timer_del(gpt->timer);
|
||||
gpt->oe = 0x00000000;
|
||||
gpt->ol = 0x00000000;
|
||||
gpt->im = 0x00000000;
|
||||
|
@ -1497,7 +1497,7 @@ static void ppc4xx_gpt_init(hwaddr base, qemu_irq irqs[5])
|
|||
for (i = 0; i < 5; i++) {
|
||||
gpt->irqs[i] = irqs[i];
|
||||
}
|
||||
gpt->timer = qemu_new_timer_ns(vm_clock, &ppc4xx_gpt_cb, gpt);
|
||||
gpt->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, &ppc4xx_gpt_cb, gpt);
|
||||
#ifdef DEBUG_GPT
|
||||
printf("%s: offset " TARGET_FMT_plx "\n", __func__, base);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue