RFC target/mips/cp0_timer: Use new clock_ns_to_ticks()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest6 patches 7 repliesIn review
- v1 RFC1 patch 4 repliesSuperseded
Changes in v2 from the cover letter
- Fix clock_has_source()
- Split patch to be more digestible
- Raise loongson3_virt/TCG clock
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | target/mips/cpu: Use clock_has_source() instead of clock_get()target/ | +1 | 1 reply | |
| 2/6 | target/mips/cpu: Update CP0 clock when CPU clock is propagatedtarget/ | +9 | 1 reply | |
| 3/6 | target/mips/cp0_timer: Add ns_to_count() helpertarget/ | +10 | 1 reply | |
| 4/6 | target/mips/cp0_timer: Add ns_substract_to_count() helpertarget/ | +9 | 1 reply | |
| 5/6 | target/mips/cp0_timer: Use new clock_ns_to_ticks()target/ target/ target/ | +31 | 1 reply | |
| 6/6 | hw/mips/loongson3_virt: Raise CPU clock to 2 GHzhw/ | +1 | 2 replies |
Reviews trailers per patch
3 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Richard Henderson |
|---|---|
| 1/6 | R-b |
| 2/6 | R-b |
| 3/6 | R-b |
| 4/6 | |
| 5/6 | |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH-for-6.1 v2 0/6] target/mips/cp0_timer: Use new clock_ns_to_ticks()
Since v1:
- Fix clock_has_source()
- Split patch to be more digestible
- Raise loongson3_virt/TCG clock
This series uses the recently introduced clock_ns_to_ticks() function which "tells me how many times this clock would tick in this length of time" to simplify the MIPS CP0 R4K timer logic and remove the restriction to use frequencies >= 1GHz.
Still RFC because we could rethink the MIPS CP0 timer logic to avoid too frequent divu128 calls (painful on 32-bit hosts).
Also, env_archcpu() could eventually be dropped (by passing MIPSCPU* instead of CPUMIPSState*).
Still, enough for a first step cleanup.
Regards,
Phil.
Philippe Mathieu-Daudé (6):
target/mips/cpu: Use clock_has_source() instead of clock_get() target/mips/cpu: Update CP0 clock when CPU clock is propagated target/mips/cp0_timer: Add ns_to_count() helper target/mips/cp0_timer: Add ns_substract_to_count() helper target/mips/cp0_timer: Use new clock_ns_to_ticks() hw/mips/loongson3_virt: Raise CPU clock to 2 GHz
target/mips/cpu.h | 1 - hw/mips/loongson3_virt.c | 2 +- target/mips/cp0_timer.c | 45 ++++++++++++++++++++++++++++++++-------- target/mips/cpu.c | 15 +++----------- 4 files changed, 40 insertions(+), 23 deletions(-)
Signature · 1 line
2.26.3