[haiku-commits] haiku: hrev56124 - in src/system: libroot/os/arch/riscv64 kernel/arch/riscv64

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 20 May 2022 21:54:49 +0000 (UTC)

hrev56124 adds 1 changeset to branch 'master'
old head: 6c675bab59e4c6f45cef294271ff5ffeb2494a92
new head: f8ef244100c854d7f049a6b4ad383d287ca3e9c8
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=f8ef244100c8+%5E6c675bab59e4

----------------------------------------------------------------------------

f8ef244100c8: system/riscv64: Use dtb-based time cv for system_time
  
  * Fixes speedy-system_time in qemu
  
  Change-Id: I07ae4d984c09f2f2503bd45acc415c219f3b3f11
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/5327
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev56124
Commit:      f8ef244100c854d7f049a6b4ad383d287ca3e9c8
URL:         https://git.haiku-os.org/haiku/commit/?id=f8ef244100c8
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Fri May 20 21:32:07 2022 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri May 20 21:54:45 2022 UTC

----------------------------------------------------------------------------

3 files changed, 1 insertion(+), 16 deletions(-)
src/system/kernel/arch/riscv64/arch_cpu.cpp             |  3 +--
src/system/kernel/arch/riscv64/arch_real_time_clock.cpp |  3 ---
src/system/libroot/os/arch/riscv64/system_time.cpp      | 11 -----------

----------------------------------------------------------------------------

diff --git a/src/system/kernel/arch/riscv64/arch_cpu.cpp 
b/src/system/kernel/arch/riscv64/arch_cpu.cpp
index a42fc8b6ab..205f31955b 100644
--- a/src/system/kernel/arch/riscv64/arch_cpu.cpp
+++ b/src/system/kernel/arch/riscv64/arch_cpu.cpp
@@ -59,12 +59,11 @@ arch_cpu_init(kernel_args *args)
                        cpu->cache_id[i] = -1;
        }
 
-/*
        uint64 conversionFactor
                = (1LL << 32) * 1000000LL / args->arch_args.timerFrequency;
 
        __riscv64_setup_system_time(conversionFactor);
-*/
+
        return B_OK;
 }
 
diff --git a/src/system/kernel/arch/riscv64/arch_real_time_clock.cpp 
b/src/system/kernel/arch/riscv64/arch_real_time_clock.cpp
index 9afd09a8ee..6e773d86bb 100644
--- a/src/system/kernel/arch/riscv64/arch_real_time_clock.cpp
+++ b/src/system/kernel/arch/riscv64/arch_real_time_clock.cpp
@@ -15,15 +15,12 @@
 status_t
 arch_rtc_init(kernel_args *args, struct real_time_data *data)
 {
-/*
        data->arch_data.system_time_conversion_factor
                = (1LL << 32) * 1000000LL / args->arch_args.timerFrequency;
-
        dprintf("timerFrequency: %" B_PRIu64 "\n",
                args->arch_args.timerFrequency);
        dprintf("system_time_conversion_factor: %" B_PRIu64 "\n",
                data->arch_data.system_time_conversion_factor);
-*/
        return B_OK;
 }
 
diff --git a/src/system/libroot/os/arch/riscv64/system_time.cpp 
b/src/system/libroot/os/arch/riscv64/system_time.cpp
index b74bb9a6f3..3a5280019c 100644
--- a/src/system/libroot/os/arch/riscv64/system_time.cpp
+++ b/src/system/libroot/os/arch/riscv64/system_time.cpp
@@ -31,17 +31,6 @@ __riscv64_setup_system_time(uint64 cv)
 [[gnu::optimize("omit-frame-pointer")]] bigtime_t
 system_time()
 {
-       // TODO: Timer unit conversion needs fixed here
-       // QEMU and SiFive boards use diferent timer frequencies
-       return CpuTime();
-/*
-       uint64 time = CpuTime();
-       uint64 lo = (uint32)time;
-       uint64 hi = time >> 32;
-       return ((lo * cv_factor) >> 32) + hi * cv_factor;
-*/
-/*
        __uint128_t time = static_cast<__uint128_t>(CpuTime()) * cv_factor;
        return time >> 32;
-*/
 }


Other related posts:

  • » [haiku-commits] haiku: hrev56124 - in src/system: libroot/os/arch/riscv64 kernel/arch/riscv64 - waddlesplash