Skip to content

Commit

Permalink
Relaxing MBWU monitor count check (#498)
Browse files Browse the repository at this point in the history
- Giving 30% room for MBWU monitor count when it encounters buffer memcpy


Change-Id: I33113bb6eb06f231a02592ccd9dc779ccff1a300

Signed-off-by: Srikar Josyula <[email protected]>
  • Loading branch information
SrikarJosyula authored Oct 21, 2024
1 parent 43e80c6 commit b09d50b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test_pool/mpam/operating_system/test_mpam003.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static void payload(void)
uint32_t rsrc_node_cnt, rsrc_index;
uint64_t mpam2_el2, mpam2_el2_temp;
uint64_t byte_count;
uint64_t byte_count_min;
uint64_t addr_base, addr_len;
uint64_t nrdy_timeout;
uint32_t test_fails = 0;
Expand Down Expand Up @@ -169,8 +170,12 @@ static void payload(void)
val_print(ACS_PRINT_DEBUG, "\n byte_count = 0x%llx bytes", byte_count);

/* the monitor must count both read and write bandwidth,
hence count must be twice of the buffer size */
if ((byte_count != 2 * BUFFER_SIZE)) {
hence count must be twice of the buffer size
with 30% room for implementation differences */
byte_count_min = 2 * BUFFER_SIZE - ((2 * BUFFER_SIZE * 3) / 10);

/* Report fail if the monitor count does not belong within permitted range */
if (!((byte_count > byte_count_min) && (byte_count <= 2 * BUFFER_SIZE))) {
val_print(ACS_PRINT_ERR, "\n Monitor count incorrect for MSC %d",
msc_index);
val_print(ACS_PRINT_ERR, " rsrc node %d", rsrc_index);
Expand Down

0 comments on commit b09d50b

Please sign in to comment.