aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazunori Asayama <asayama@sm.sony.co.jp>2009-03-13 18:18:11 -0700
committerYuji Mano <yuji.mano@am.sony.com>2009-03-17 10:58:27 -0700
commit4d7ae64cdcae55856724cc46f215d81be084fb2e (patch)
tree5aac4441cb011b0c613041f00f84f951478ff24c
parente1a811432bb398258ea2c7d71b5dc24be71cadac (diff)
downloadmars-src-4d7ae64cdcae55856724cc46f215d81be084fb2e.tar.gz
base: Initial workload counter fix
Change initial workload counter value This patch changes initial workload counter value from MARS_WORKLOAD_COUNTER_MIN to MARS_WORKLOAD_COUNTER_MAX to avoid scheduling the same workload again before scheduling newly added workloads. Signed-off-by: Kazunori Asayama <asayama@sm.sony.co.jp> Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>
-rw-r--r--base/src/host/lib/workload_queue.c2
-rw-r--r--base/src/mpu/kernel/kernel.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/base/src/host/lib/workload_queue.c b/base/src/host/lib/workload_queue.c
index 712de7a..a954842 100644
--- a/base/src/host/lib/workload_queue.c
+++ b/base/src/host/lib/workload_queue.c
@@ -91,7 +91,7 @@ static void init_header(uint64_t queue_ea)
/* create initial bit pattern of workload queue header */
MARS_BITS_SET(&bits, BLOCK_PRIORITY, MARS_WORKLOAD_BLOCK_PRIORITY_MIN);
- MARS_BITS_SET(&bits, BLOCK_COUNTER, MARS_WORKLOAD_BLOCK_COUNTER_MIN);
+ MARS_BITS_SET(&bits, BLOCK_COUNTER, MARS_WORKLOAD_BLOCK_COUNTER_MAX);
MARS_BITS_SET(&bits, BLOCK_READY, MARS_WORKLOAD_BLOCK_READY_OFF);
MARS_BITS_SET(&bits, BLOCK_WAITING, MARS_WORKLOAD_BLOCK_WAITING_OFF);
diff --git a/base/src/mpu/kernel/kernel.c b/base/src/mpu/kernel/kernel.c
index 45f975d..2803ba0 100644
--- a/base/src/mpu/kernel/kernel.c
+++ b/base/src/mpu/kernel/kernel.c
@@ -435,7 +435,7 @@ static uint64_t set_schedule_bits(uint64_t bits, uint64_t priority)
/* set the info bits inside queue block for this workload */
MARS_BITS_SET(&bits, WORKLOAD_STATE, MARS_WORKLOAD_STATE_SCHEDULING);
MARS_BITS_SET(&bits, WORKLOAD_PRIORITY, priority);
- MARS_BITS_SET(&bits, WORKLOAD_COUNTER, MARS_WORKLOAD_COUNTER_MIN);
+ MARS_BITS_SET(&bits, WORKLOAD_COUNTER, MARS_WORKLOAD_COUNTER_MAX);
MARS_BITS_SET(&bits, WORKLOAD_SIGNAL, MARS_WORKLOAD_SIGNAL_OFF);
MARS_BITS_SET(&bits, WORKLOAD_WAIT_ID, MARS_WORKLOAD_ID_NONE);