summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorschodet2010-05-21 14:19:17 +0000
committerschodet2010-05-21 14:19:17 +0000
commit6de0800be1e295c6072c282a6b0801960467bc24 (patch)
treeef13d40f731d4402a86dd9b3980582bcb94e7f00 /cesar
parent507f4868c57bd4c2f4fe91681d3a81b0186dfa29 (diff)
cesar/hal/hle, cesar/hle: remove ipmbox_tx_try, refs #1418
This revert commits r6949, r6950 and r6954. ipmbox can not overflow because the number of message is limited by the number of buffer sent and added by the Linux driver. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7125 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar')
-rw-r--r--cesar/hal/hle/ipmbox.h13
-rw-r--r--cesar/hal/hle/maximus/src/maximus_ipmbox.c8
-rw-r--r--cesar/hal/hle/src/ipmbox.c19
-rw-r--r--cesar/hal/hle/test/src/hal_hle_ipmbox.c18
-rw-r--r--cesar/hle/inc/trace.h3
-rw-r--r--cesar/hle/src/hle.c14
-rw-r--r--cesar/hle/src/trace.c1
-rw-r--r--cesar/hle/test/src/hle_send_to_arm.c7
-rw-r--r--cesar/hle/test/src/interface-send.c7
-rw-r--r--cesar/hle/test/src/ipmbox.c6
-rw-r--r--cesar/test_general/maximus/integration/hle-cl-sar-pbproc/src/station.c7
11 files changed, 4 insertions, 99 deletions
diff --git a/cesar/hal/hle/ipmbox.h b/cesar/hal/hle/ipmbox.h
index f31a572d3f..9507383928 100644
--- a/cesar/hal/hle/ipmbox.h
+++ b/cesar/hal/hle/ipmbox.h
@@ -57,19 +57,6 @@ ipmbox_uninit (ipmbox_t *ctx);
void
ipmbox_tx (ipmbox_t *ctx, u32 *first_msg, uint length);
-/**
- * Try to transmit using the mailbox.
- * \param ctx ipmbox context
- * \param first_msg pointer to the first message header
- * \param length total length (in word) of messages to transmit
- * \return true on success
- *
- * The message will be transmitted only if there is more than the reserved
- * size.
- */
-bool
-ipmbox_tx_try (ipmbox_t *ctx, u32 *first_msg, uint length);
-
END_DECLS
#endif /* hal_hle_ipmbox_h */
diff --git a/cesar/hal/hle/maximus/src/maximus_ipmbox.c b/cesar/hal/hle/maximus/src/maximus_ipmbox.c
index 4e327b1ef5..ac2dfc2596 100644
--- a/cesar/hal/hle/maximus/src/maximus_ipmbox.c
+++ b/cesar/hal/hle/maximus/src/maximus_ipmbox.c
@@ -335,11 +335,3 @@ ipmbox_tx (ipmbox_t *ctx, u32 *first_msg, uint length)
}
}
}
-
-bool
-ipmbox_tx_try (ipmbox_t *ctx, u32 *first_msg, uint length)
-{
- ipmbox_tx (ctx, first_msg, length);
- return true;
-}
-
diff --git a/cesar/hal/hle/src/ipmbox.c b/cesar/hal/hle/src/ipmbox.c
index cc6b2d180b..002d5c9863 100644
--- a/cesar/hal/hle/src/ipmbox.c
+++ b/cesar/hal/hle/src/ipmbox.c
@@ -28,9 +28,6 @@
* mailbox will be cut without analysis. */
#define MAILBOX_RX_BUDGET 256
-/** Reserved words in mailbox for messages with high priority. */
-#define MAILBOX_TX_RESERVED_WORDS (L2A_RING_WORDS / 2)
-
/** Global context variable */
static ipmbox_t context;
/** Ipmbox Rx buffer */
@@ -72,22 +69,6 @@ void ipmbox_tx (ipmbox_t *ctx, u32 *first_msg, uint length)
halmbx_copy_to_ring (first_msg, length);
}
-bool
-ipmbox_tx_try (ipmbox_t *ctx, u32 *first_msg, uint length)
-{
- dbg_assert (ctx);
- dbg_assert (first_msg);
- dbg_assert (length);
- if (L2A_RING_WORDS - L2A_RING_USED_WORDS (L2A_HEAD, L2A_TAIL)
- > MAILBOX_TX_RESERVED_WORDS)
- {
- ipmbox_tx (ctx, first_msg, length);
- return true;
- }
- else
- return false;
-}
-
/**
* Mailbox receive ISR handler function.
* \param vector interrupt vector number
diff --git a/cesar/hal/hle/test/src/hal_hle_ipmbox.c b/cesar/hal/hle/test/src/hal_hle_ipmbox.c
index e751021eb7..5bd60daeb5 100644
--- a/cesar/hal/hle/test/src/hal_hle_ipmbox.c
+++ b/cesar/hal/hle/test/src/hal_hle_ipmbox.c
@@ -95,27 +95,9 @@ test_ipmbox_tx (void)
{
uint n;
u32 msg[2];
- bool r;
test_case_begin (test, "tx");
ctx = ipmbox_init (NULL, my_callback);
n = 0;
- test_begin (test, "try ok")
- {
- while (n < L2A_RING_WORDS / 2)
- {
- msg[0] = n++;
- msg[1] = n++;
- r = ipmbox_tx_try (ctx, msg, 2);
- test_fail_unless (r == true);
- }
- } test_end;
- test_begin (test, "try nok")
- {
- msg[0] = 42;
- msg[1] = 1234;
- r = ipmbox_tx_try (ctx, msg, 2);
- test_fail_unless (r == false);
- } test_end;
test_begin (test, "tx ok")
{
while (n < L2A_RING_WORDS - 2)
diff --git a/cesar/hle/inc/trace.h b/cesar/hle/inc/trace.h
index 287de29092..29ba7ec8c1 100644
--- a/cesar/hle/inc/trace.h
+++ b/cesar/hle/inc/trace.h
@@ -34,8 +34,7 @@ enum
HLE_TRACE_MME_SEND,
HLE_TRACE_MME_RECV,
HLE_TRACE_IPMBOX,
- HLE_TRACE_DROPPED,
- HLE_TRACE_DROP
+ HLE_TRACE_DROPPED
};
BEGIN_DECLS
diff --git a/cesar/hle/src/hle.c b/cesar/hle/src/hle.c
index 11cd468faf..9f29a60908 100644
--- a/cesar/hle/src/hle.c
+++ b/cesar/hle/src/hle.c
@@ -179,12 +179,7 @@ void hle_data_recv (hle_t *ctx, u8 *buffer, uint length)
word[1] = (uint) buffer;
- if (!ipmbox_tx_try (ctx->ipmbox, word, 2))
- {
- /* Can not transmit message, drop and reuse buffer. */
- HLE_TRACE (DROP);
- cl_data_buffer_add (ctx->cl, buffer);
- }
+ ipmbox_tx (ctx->ipmbox, word, 2);
}
/**
@@ -255,12 +250,7 @@ void hle_mme_recv (hle_t *ctx, u8 *buffer, uint length)
(PARAM_MSG_LENGTH, length));
word[1] = (uint) buffer;
- if (!ipmbox_tx_try (ctx->ipmbox, word, 2))
- {
- /* Can not transmit message, drop and reuse buffer. */
- HLE_TRACE (DROP);
- cl_mme_buffer_add (ctx->cl, buffer);
- }
+ ipmbox_tx (ctx->ipmbox, word, 2);
}
/**
diff --git a/cesar/hle/src/trace.c b/cesar/hle/src/trace.c
index d5e3656887..0945e876b4 100644
--- a/cesar/hle/src/trace.c
+++ b/cesar/hle/src/trace.c
@@ -38,7 +38,6 @@ hle_trace_init (hle_t *ctx)
TRACE_EVENT (HLE_TRACE_MME_RECV, "HLE_MME_RECV length : %d, buffer @ : %x", TIMESTAMP),
TRACE_EVENT (HLE_TRACE_IPMBOX, "HLE_IPMBOX_ACTIVATE avctive : %d", TIMESTAMP),
TRACE_EVENT (HLE_TRACE_DROPPED, "HLE_MSG DROPPED data: %d, length: %d, buffer: %x", TIMESTAMP),
- TRACE_EVENT (HLE_TRACE_DROP, "DROP"),
};
dbg_assert (ctx);
trace_namespace_init (&namespace, event_ids, COUNT (event_ids));
diff --git a/cesar/hle/test/src/hle_send_to_arm.c b/cesar/hle/test/src/hle_send_to_arm.c
index 84c8e309f7..4daa0732c8 100644
--- a/cesar/hle/test/src/hle_send_to_arm.c
+++ b/cesar/hle/test/src/hle_send_to_arm.c
@@ -91,13 +91,6 @@ void ipmbox_tx (ipmbox_t *ctx, u32 *msg_buffer, uint length)
data_sent = true;
}
-bool
-ipmbox_tx_try (ipmbox_t *ctx, u32 *msg_buffer, uint length)
-{
- data_sent = true;
- return true;
-}
-
void
ipmbox_activate (ipmbox_t *ctx, bool activation)
{
diff --git a/cesar/hle/test/src/interface-send.c b/cesar/hle/test/src/interface-send.c
index 0a85c9ff33..581ae4a2b7 100644
--- a/cesar/hle/test/src/interface-send.c
+++ b/cesar/hle/test/src/interface-send.c
@@ -55,13 +55,6 @@ void ipmbox_tx (ipmbox_t *ctx, u32 *msg_buffer, uint length)
test_end;
}
-bool
-ipmbox_tx_try (ipmbox_t *ctx, u32 *msg_buffer, uint length)
-{
- dbg_assert_default ();
- return true;
-}
-
void
ipmbox_activate (ipmbox_t *ctx, bool activation)
{
diff --git a/cesar/hle/test/src/ipmbox.c b/cesar/hle/test/src/ipmbox.c
index b7b94e9a1f..6f03bafed6 100644
--- a/cesar/hle/test/src/ipmbox.c
+++ b/cesar/hle/test/src/ipmbox.c
@@ -30,12 +30,6 @@ void ipmbox_tx (ipmbox_t *ctx, u32 *msg_buffer, uint length)
}
-bool
-ipmbox_tx_try (ipmbox_t *ctx, u32 *msg_buffer, uint length)
-{
- return true;
-}
-
void
ipmbox_activate (ipmbox_t *ctx, bool activation)
{
diff --git a/cesar/test_general/maximus/integration/hle-cl-sar-pbproc/src/station.c b/cesar/test_general/maximus/integration/hle-cl-sar-pbproc/src/station.c
index f4b2f8164e..42f95309af 100644
--- a/cesar/test_general/maximus/integration/hle-cl-sar-pbproc/src/station.c
+++ b/cesar/test_general/maximus/integration/hle-cl-sar-pbproc/src/station.c
@@ -137,7 +137,7 @@ void maximus_cp_mme_get (void *user, u8 *buffer)
* \param first_msg pointer to the first received message header
* \param length total length (in word) of messages to transmit
*/
-bool ipmbox_tx_try (ipmbox_t *ctx, u32 *first_msg, uint length)
+void ipmbox_tx (ipmbox_t *ctx, u32 *first_msg, uint length)
{
printf ("/***************************************************/\n");
printf ("/ IPMBOX RECV /\n");
@@ -168,12 +168,7 @@ bool ipmbox_tx_try (ipmbox_t *ctx, u32 *first_msg, uint length)
}
printf ("/***************************************************/\n");
- return true;
-}
-void ipmbox_tx (ipmbox_t *ctx, u32 *first_msg, uint length)
-{
- ipmbox_tx_try (ctx, first_msg, length);
}
/**