diff options
author | Daniel Jacobowitz <drow@false.org> | 2009-09-13 09:54:41 -0400 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2009-09-14 11:16:50 +0200 |
commit | 042eb37a04c9bf0cc76d14038a8ed35e3de713e2 (patch) | |
tree | 1580334ffcd321d7a06f20082b4598acf93fb325 /hw | |
parent | pflash_cfi01: Correct debug build, no functional changes. (diff) | |
download | qemu-kvm-042eb37a04c9bf0cc76d14038a8ed35e3de713e2.tar.gz qemu-kvm-042eb37a04c9bf0cc76d14038a8ed35e3de713e2.tar.bz2 qemu-kvm-042eb37a04c9bf0cc76d14038a8ed35e3de713e2.zip |
Fix Linux task preemption on Versatile board
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/arm_sysctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/arm_sysctl.c b/hw/arm_sysctl.c index 686c1cc90..26300ef8a 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 */ |