summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2009-09-15 00:30:41 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-09-15 00:53:00 +0200
commit5c59f6c246249f4c03281d0ab02b81f38f65b398 (patch)
tree2c33f6c8239e051cc53ae36bc64a0bc02e29c21f
parent36170c5faf3c1404e36d1e96858732380d4db6c9 (diff)
downloadqemu-5c59f6c246249f4c03281d0ab02b81f38f65b398.tar.gz
qemu-5c59f6c246249f4c03281d0ab02b81f38f65b398.zip
Fix Linux task preemption on Versatile board
Backport from master: 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 <dan@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--hw/arm_sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c
index 62222a1ab3..06661d8e75 100644
--- a/hw/arm_sysctl.c
+++ b/hw/arm_sysctl.c
@@ -8,6 +8,7 @@
*/
#include "hw.h"
+#include "qemu-timer.h"
#include "primecell.h"
#include "sysemu.h"
@@ -70,8 +71,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, ticks_per_sec);
case 0x60: /* MISC */
return 0;
case 0x84: /* PROCID0 */