[Cbe-oss-dev] [PATCH 5/5]MARS/base: kernel fix idle signal
Yuji Mano
yuji.mano at am.sony.com
Tue Jun 16 10:04:13 EST 2009
This patch is a fix to a kernel bug that causes the kernel to remain in the idle
wait state even when another MPU has sent a new signal to a workload that should
cause it to change state.
Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>
---
base/src/mpu/kernel/kernel.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/base/src/mpu/kernel/kernel.c
+++ b/base/src/mpu/kernel/kernel.c
@@ -53,6 +53,7 @@
#define MARS_KERNEL_STATUS_BUSY 0x4
#define MARS_KERNEL_STATUS_RETRY 0x8
+#define MARS_KERNEL_UPDATE_HEADER_BITS_ACCESS 0x0
#define MARS_KERNEL_UPDATE_HEADER_BITS_STATE 0x1
#define MARS_KERNEL_UPDATE_HEADER_BITS_COUNTER 0x2
#define MARS_KERNEL_UPDATE_HEADER_BITS_COUNTER_RESET 0x4
@@ -243,7 +244,7 @@ static void update_header_bits(int mode,
MARS_BITS_SET(block_bits, BLOCK_WAITING, block_waiting);
MARS_BITS_SET(block_bits, BLOCK_PRIORITY, block_priority);
/* update header bits counter */
- } else {
+ } else if (mode) {
/* reset is not specified so increment current block counter */
if (mode & MARS_KERNEL_UPDATE_HEADER_BITS_COUNTER) {
block_counter =
@@ -399,6 +400,9 @@ static uint64_t set_signal_bits(uint64_t
{
MARS_BITS_SET(&bits, WORKLOAD_SIGNAL, signal);
+ /* update queue header bits access in case kernel is idle */
+ update_header_bits(MARS_KERNEL_UPDATE_HEADER_BITS_ACCESS, 0);
+
return bits;
}
More information about the cbe-oss-dev
mailing list