Skip to content
Snippets Groups Projects
Commit bdebf009 authored by Aurelien Jarno's avatar Aurelien Jarno
Browse files

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: default avatarDaniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
parent 53094238
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
* This code is licenced under the GPL. * This code is licenced under the GPL.
*/ */
#include "hw.h"
#include "qemu-timer.h"
#include "sysbus.h" #include "sysbus.h"
#include "primecell.h" #include "primecell.h"
#include "sysemu.h" #include "sysemu.h"
...@@ -71,8 +73,7 @@ static uint32_t arm_sysctl_read(void *opaque, target_phys_addr_t offset) ...@@ -71,8 +73,7 @@ static uint32_t arm_sysctl_read(void *opaque, target_phys_addr_t offset)
case 0x58: /* BOOTCS */ case 0x58: /* BOOTCS */
return 0; return 0;
case 0x5c: /* 24MHz */ case 0x5c: /* 24MHz */
/* ??? not implemented. */ return muldiv64(qemu_get_clock(vm_clock), 24000000, ticks_per_sec);
return 0;
case 0x60: /* MISC */ case 0x60: /* MISC */
return 0; return 0;
case 0x84: /* PROCID0 */ case 0x84: /* PROCID0 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment