提交 042eb37a 编写于 作者: D Daniel Jacobowitz 提交者: Aurelien Jarno

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: NDaniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 fad8c772
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册