Hello Andreas Sandberg,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/c/public/gem5/+/18590
to review the following change.
Change subject: dev-arm: Fix GICv3 LPI loop
......................................................................
dev-arm: Fix GICv3 LPI loop
Loop was mistakenly increasing the upper bound of the iteration rather
than the index variable itself.
Change-Id: I0a5a7bc189bc0954a8a6d9581032c2ed902030da
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
---
M src/dev/arm/gic_v3_redistributor.cc
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dev/arm/gic_v3_redistributor.cc
b/src/dev/arm/gic_v3_redistributor.cc
index 348cd96..3039e1e 100644
--- a/src/dev/arm/gic_v3_redistributor.cc
+++ b/src/dev/arm/gic_v3_redistributor.cc
@@ -830,14 +830,14 @@
}
// Check LPIs
- uint32_t largest_lpi_id = 1 << (lpiIDBits + 1);
+ const uint32_t largest_lpi_id = 1 << (lpiIDBits + 1);
char lpi_pending_table[largest_lpi_id / 8];
ThreadContext * tc = gic->getSystem()->getThreadContext(cpuId);
tc->getVirtProxy().readBlob(lpiPendingTablePtr,
(uint8_t *) lpi_pending_table,
sizeof(lpi_pending_table));
for (int lpi_id = SMALLEST_LPI_ID; lpi_id < largest_lpi_id;
- largest_lpi_id++) {
+ lpi_id++) {
uint32_t lpi_pending_entry_byte = lpi_id / 8;
uint8_t lpi_pending_entry_bit_position = lpi_id % 8;
bool lpi_is_pending = lpi_pending_table[lpi_pending_entry_byte] &
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18590
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I0a5a7bc189bc0954a8a6d9581032c2ed902030da
Gerrit-Change-Number: 18590
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev