qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 042eb37] Fix Linux task preemption on Versatile b


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 042eb37] Fix Linux task preemption on Versatile board
Date: Mon, 14 Sep 2009 09:18:10 -0000

From: Daniel Jacobowitz <address@hidden>

Recent versions of the Linux kernel will not preempt CPU-intensive
tasks unless the clock used by sched_clock() works.  On -M versatilepb
that's the 24MHz timer in the system controller.  It's a very simple
timer, so implement it.

Signed-off-by: Daniel Jacobowitz <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>

diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c
index 686c1cc..26300ef 100644
--- a/hw/arm_sysctl.c
+++ b/hw/arm_sysctl.c
@@ -7,6 +7,8 @@
  * This code is licenced under the GPL.
  */
 
+#include "hw.h"
+#include "qemu-timer.h"
 #include "sysbus.h"
 #include "primecell.h"
 #include "sysemu.h"
@@ -71,8 +73,7 @@ static uint32_t arm_sysctl_read(void *opaque, 
target_phys_addr_t offset)
     case 0x58: /* BOOTCS */
         return 0;
     case 0x5c: /* 24MHz */
-        /* ??? not implemented.  */
-        return 0;
+        return muldiv64(qemu_get_clock(vm_clock), 24000000, 
get_ticks_per_sec());
     case 0x60: /* MISC */
         return 0;
     case 0x84: /* PROCID0 */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]