All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PULL 48/48] hw/timer/armv7m_systick: Rewrite to use ptimers
Date: Wed, 4 Nov 2020 11:03:57 +0100	[thread overview]
Message-ID: <20201104100357.7t4nnwqot6ahprrh@kamzik.brq.redhat.com> (raw)
In-Reply-To: <20201027114438.17662-49-peter.maydell@linaro.org>

On Tue, Oct 27, 2020 at 11:44:38AM +0000, Peter Maydell wrote:
> The armv7m systick timer is a 24-bit decrementing, wrap-on-zero,
> clear-on-write counter. Our current implementation has various
> bugs and dubious workarounds in it (for instance see
> https://bugs.launchpad.net/qemu/+bug/1872237).
> 
> We have an implementation of a simple decrementing counter
> and we put a lot of effort into making sure it handles the
> interesting corner cases (like "spend a cycle at 0 before
> reloading") -- ptimer.
> 
> Rewrite the systick timer to use a ptimer rather than
> a raw QEMU timer.
> 
> Unfortunately this is a migration compatibility break,
> which will affect all M-profile boards.
> 
> Among other bugs, this fixes
> https://bugs.launchpad.net/qemu/+bug/1872237 :
> now writes to SYST_CVR when the timer is enabled correctly
> do nothing; when the timer is enabled via SYST_CSR.ENABLE,
> the ptimer code will (because of POLICY_NO_IMMEDIATE_RELOAD)
> arrange that after one timer tick the counter is reloaded
> from SYST_RVR and then counts down from there, as the
> architecture requires.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Message-id: 20201015151829.14656-3-peter.maydell@linaro.org
> ---
>  include/hw/timer/armv7m_systick.h |   3 +-
>  hw/timer/armv7m_systick.c         | 124 +++++++++++++-----------------
>  2 files changed, 54 insertions(+), 73 deletions(-)
>

Do we also need something like the diff below now?


diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index fdf4464b9484..7d5d89e1acf9 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -291,6 +291,7 @@ config ZYNQ
 
 config ARM_V7M
     bool
+    select PTIMER
 
 config ALLWINNER_A10
     bool


Thanks,
drew



  reply	other threads:[~2020-11-04 10:05 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 11:43 [PULL 00/48] target-arm queue Peter Maydell
2020-10-27 11:43 ` [PULL 01/48] linux-user/aarch64: Reset btype for signals Peter Maydell
2020-10-27 11:43 ` [PULL 02/48] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI Peter Maydell
2020-10-27 11:43 ` [PULL 03/48] include/elf: Add defines related to GNU property notes for AArch64 Peter Maydell
2020-10-27 11:43 ` [PULL 04/48] linux-user/elfload: Avoid leaking interp_name using GLib memory API Peter Maydell
2020-10-27 11:43 ` [PULL 05/48] linux-user/elfload: Fix coding style in load_elf_image Peter Maydell
2020-10-27 11:43 ` [PULL 06/48] linux-user/elfload: Adjust iteration over phdr Peter Maydell
2020-10-27 11:43 ` [PULL 07/48] linux-user/elfload: Move PT_INTERP detection to first loop Peter Maydell
2020-10-27 11:43 ` [PULL 08/48] linux-user/elfload: Use Error for load_elf_image Peter Maydell
2020-10-27 11:43 ` [PULL 09/48] linux-user/elfload: Use Error for load_elf_interp Peter Maydell
2020-10-27 11:44 ` [PULL 10/48] linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes Peter Maydell
2020-10-27 11:44 ` [PULL 11/48] linux-user/elfload: Parse GNU_PROPERTY_AARCH64_FEATURE_1_AND Peter Maydell
2020-10-27 11:44 ` [PULL 12/48] tests/tcg/aarch64: Add bti smoke tests Peter Maydell
2020-10-27 11:44 ` [PULL 13/48] hw/arm/highbank: Silence warnings about missing fallthrough statements Peter Maydell
2020-10-27 11:44 ` [PULL 14/48] hw/arm: fix min_cpus for xlnx-versal-virt platform Peter Maydell
2020-10-27 11:44 ` [PULL 15/48] Move npcm7xx_timer_reached_zero call out of npcm7xx_timer_pause Peter Maydell
2020-10-27 11:44 ` [PULL 16/48] hw/timer: Adding watchdog for NPCM7XX Timer Peter Maydell
2020-10-27 11:44 ` [PULL 17/48] hw/misc: Add npcm7xx random number generator Peter Maydell
2020-10-27 11:44 ` [PULL 18/48] hw/arm/npcm7xx: Add EHCI and OHCI controllers Peter Maydell
2020-10-27 11:44 ` [PULL 19/48] hw/gpio: Add GPIO model for Nuvoton NPCM7xx Peter Maydell
2020-10-27 11:44 ` [PULL 20/48] hw/arm/smmuv3: Set the restoration priority of the vSMMUv3 explicitly Peter Maydell
2020-10-27 11:44 ` [PULL 21/48] hw/arm/bcm2836: Restrict BCM283XInfo declaration to C source Peter Maydell
2020-10-27 11:44 ` [PULL 22/48] hw/arm/bcm2836: QOM'ify more by adding class_init() to each SoC type Peter Maydell
2020-10-27 11:44 ` [PULL 23/48] hw/arm/bcm2836: Introduce BCM283XClass::core_count Peter Maydell
2020-10-27 11:44 ` [PULL 24/48] hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs Peter Maydell
2020-10-27 11:44 ` [PULL 25/48] hw/arm/bcm2836: Split out common realize() code Peter Maydell
2020-10-27 11:44 ` [PULL 26/48] hw/arm/bcm2836: Introduce the BCM2835 SoC Peter Maydell
2020-10-27 11:44 ` [PULL 27/48] hw/arm/raspi: Add the Raspberry Pi A+ machine Peter Maydell
2020-10-27 11:44 ` [PULL 28/48] hw/arm/raspi: Add the Raspberry Pi Zero machine Peter Maydell
2020-10-27 11:44 ` [PULL 29/48] hw/arm/raspi: Add the Raspberry Pi 3 model A+ Peter Maydell
2020-10-27 11:44 ` [PULL 30/48] arm/trace: Fix hex printing Peter Maydell
2020-10-27 11:44 ` [PULL 31/48] hw/core/clock: provide the VMSTATE_ARRAY_CLOCK macro Peter Maydell
2020-10-27 11:44 ` [PULL 32/48] hw/core/clock: trace clock values in Hz instead of ns Peter Maydell
2020-10-27 11:44 ` [PULL 33/48] hw/arm/raspi: fix CPRMAN base address Peter Maydell
2020-10-27 11:44 ` [PULL 34/48] hw/arm/raspi: add a skeleton implementation of the CPRMAN Peter Maydell
2020-10-27 11:44 ` [PULL 35/48] hw/misc/bcm2835_cprman: add a PLL skeleton implementation Peter Maydell
2020-10-27 11:44 ` [PULL 36/48] hw/misc/bcm2835_cprman: implement PLLs behaviour Peter Maydell
2020-10-27 11:44 ` [PULL 37/48] hw/misc/bcm2835_cprman: add a PLL channel skeleton implementation Peter Maydell
2020-10-27 11:44 ` [PULL 38/48] hw/misc/bcm2835_cprman: implement PLL channels behaviour Peter Maydell
2020-10-27 11:44 ` [PULL 39/48] hw/misc/bcm2835_cprman: add a clock mux skeleton implementation Peter Maydell
2020-10-27 11:44 ` [PULL 40/48] hw/misc/bcm2835_cprman: implement clock mux behaviour Peter Maydell
2020-10-27 11:44 ` [PULL 41/48] hw/misc/bcm2835_cprman: add the DSI0HSCK multiplexer Peter Maydell
2020-10-27 11:44 ` [PULL 42/48] hw/misc/bcm2835_cprman: add sane reset values to the registers Peter Maydell
2020-10-27 11:44 ` [PULL 43/48] hw/char/pl011: add a clock input Peter Maydell
2020-10-27 11:44 ` [PULL 44/48] hw/arm/bcm2835_peripherals: connect the UART clock Peter Maydell
2020-10-27 11:44 ` [PULL 45/48] hw/watchdog: Implement SBSA watchdog device Peter Maydell
2020-10-27 11:44 ` [PULL 46/48] hw/arm/sbsa-ref: add " Peter Maydell
2020-10-27 11:44 ` [PULL 47/48] hw/core/ptimer: Support ptimer being disabled by timer callback Peter Maydell
2020-10-27 11:44 ` [PULL 48/48] hw/timer/armv7m_systick: Rewrite to use ptimers Peter Maydell
2020-11-04 10:03   ` Andrew Jones [this message]
2020-11-04 10:11     ` Philippe Mathieu-Daudé
2020-11-04 10:26       ` Andrew Jones
2020-10-27 13:22 ` [PULL 00/48] target-arm queue no-reply
2020-10-29 14:30 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201104100357.7t4nnwqot6ahprrh@kamzik.brq.redhat.com \
    --to=drjones@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.