diff options
author | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2019-04-23 17:38:54 +0100 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2019-05-02 12:44:13 +0000 |
commit | 2df87bc1fd5ec12d2206c38338ff8fb26e8d4bcc (patch) | |
tree | 5cc011df1e7560c1025cb79db18b1d774bad2080 /src | |
parent | 9de1f75f16ecde72856965844ed4bbeb62c33224 (diff) | |
download | gem5-2df87bc1fd5ec12d2206c38338ff8fb26e8d4bcc.tar.xz |
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.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18590
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/dev/arm/gic_v3_redistributor.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dev/arm/gic_v3_redistributor.cc b/src/dev/arm/gic_v3_redistributor.cc index 348cd9627..3039e1e55 100644 --- a/src/dev/arm/gic_v3_redistributor.cc +++ b/src/dev/arm/gic_v3_redistributor.cc @@ -830,14 +830,14 @@ Gicv3Redistributor::update() } // 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] & |