Module: xenomai-rpm
Branch: for-upstream
Commit: 1eb923339366a8da7451d5eabd4ee7a4cf02756f
URL:    
http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=1eb923339366a8da7451d5eabd4ee7a4cf02756f

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Mar  8 12:12:34 2010 +0100

x86: initialize clockfreq value

---

 ksrc/arch/x86/hal_32.c |    6 ++++++
 ksrc/arch/x86/hal_64.c |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/ksrc/arch/x86/hal_32.c b/ksrc/arch/x86/hal_32.c
index 026b03f..5d20d75 100644
--- a/ksrc/arch/x86/hal_32.c
+++ b/ksrc/arch/x86/hal_32.c
@@ -365,6 +365,12 @@ int rthal_arch_init(void)
        rthal_setup_8254_tsc();
 #endif /* CONFIG_X86_TSC */
 
+       if (rthal_timerfreq_arg == 0)
+               rthal_timerfreq_arg = rthal_get_timerfreq();
+
+       if (rthal_clockfreq_arg == 0)
+               rthal_clockfreq_arg = rthal_get_clockfreq();
+
        return 0;
 }
 
diff --git a/ksrc/arch/x86/hal_64.c b/ksrc/arch/x86/hal_64.c
index 91d3715..2230183 100644
--- a/ksrc/arch/x86/hal_64.c
+++ b/ksrc/arch/x86/hal_64.c
@@ -79,6 +79,12 @@ int rthal_arch_init(void)
                /* FIXME: 4Ghz barrier is close... */
                rthal_cpufreq_arg = rthal_get_cpufreq();
 
+       if (rthal_timerfreq_arg == 0)
+               rthal_timerfreq_arg = rthal_get_timerfreq();
+
+       if (rthal_clockfreq_arg == 0)
+               rthal_clockfreq_arg = rthal_get_clockfreq();
+
        return 0;
 }
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to