Skip to content

Commit 7a82e7e

Browse files
rajatgoyal47chetan-rathore
authored andcommitted
fix(mpam): scan all SRAT entries for memory domains
- Use num_of_srat_entries as the scan bound while keeping the existing mem_range_index validation against num_of_mem_ranges. Also update the stale function parameter comment. Change-Id: I70837bf50e90329414a6e30e2f4a1a6a9504cee2
1 parent b664b1a commit 7a82e7e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

val/src/acs_mpam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ val_srat_get_info(SRAT_INFO_e type, uint64_t data)
310310
/**
311311
@brief This API returns proximity domain mapped to the memory range.
312312
313-
@param none
313+
@param mem_range_index memory range index
314314
@return proximity domain
315315
**/
316316
uint64_t
@@ -328,7 +328,7 @@ val_srat_get_prox_domain(uint64_t mem_range_index)
328328
return SRAT_INVALID_INFO;
329329
}
330330

331-
for (i = 0; i < g_srat_info_table->num_of_mem_ranges; i++) {
331+
for (i = 0; i < g_srat_info_table->num_of_srat_entries; i++) {
332332
if (g_srat_info_table->srat_info[i].node_type == SRAT_NODE_MEM_AFF) {
333333
if (mem_range_index == 0)
334334
return g_srat_info_table->srat_info[i].node_data.mem_aff.prox_domain;

0 commit comments

Comments
 (0)